Class: Prof::Tile

Inherits:
Object
  • Object
show all
Defined in:
lib/prof/tile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, version: nil, guid: nil) ⇒ Tile

Returns a new instance of Tile.



13
14
15
16
17
# File 'lib/prof/tile.rb', line 13

def initialize(name:, version: nil, guid: nil)
  @name    = name
  @version = version
  @guid    = guid
end

Instance Attribute Details

#guidObject (readonly)

Returns the value of attribute guid.



23
24
25
# File 'lib/prof/tile.rb', line 23

def guid
  @guid
end

#nameObject (readonly)

Returns the value of attribute name.



23
24
25
# File 'lib/prof/tile.rb', line 23

def name
  @name
end

#versionObject (readonly)

Returns the value of attribute version.



23
24
25
# File 'lib/prof/tile.rb', line 23

def version
  @version
end

Instance Method Details

#to_sObject



19
20
21
# File 'lib/prof/tile.rb', line 19

def to_s
  version ? "#{name} v#{version}" : name
end