Class: Prof::Tile
- Inherits:
-
Object
- Object
- Prof::Tile
- Defined in:
- lib/prof/tile.rb
Instance Attribute Summary collapse
-
#guid ⇒ Object
readonly
Returns the value of attribute guid.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(name:, version: nil, guid: nil) ⇒ Tile
constructor
A new instance of Tile.
- #to_s ⇒ Object
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
#guid ⇒ Object (readonly)
Returns the value of attribute guid.
23 24 25 |
# File 'lib/prof/tile.rb', line 23 def guid @guid end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
23 24 25 |
# File 'lib/prof/tile.rb', line 23 def name @name end |
#version ⇒ Object (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_s ⇒ Object
19 20 21 |
# File 'lib/prof/tile.rb', line 19 def to_s version ? "#{name} v#{version}" : name end |