forked from Seltcana/rootfs-wip
16 lines
403 B
Crystal
16 lines
403 B
Crystal
class RootFS::Quadruplet
|
|
getter name : String
|
|
getter version : String?
|
|
getter architecture : String?
|
|
getter variant : String?
|
|
|
|
def initialize(template : String)
|
|
template_as_array = template.split /-/
|
|
|
|
@name = template_as_array[0].downcase
|
|
@version = template_as_array[1]?
|
|
@architecture = template_as_array[2]?
|
|
@variant = template_as_array[3]?
|
|
end
|
|
end
|