Class: Pixelart::Metadata::Sprite
- Inherits:
-
Object
- Object
- Pixelart::Metadata::Sprite
- Defined in:
- lib/spritesheet/spritesheet.rb
Overview
todo/check: rename/change type to category - why? why not?
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#more_names ⇒ Object
readonly
Returns the value of attribute more_names.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(id:, name:, type:, more_names: []) ⇒ Sprite
constructor
A new instance of Sprite.
Constructor Details
#initialize(id:, name:, type:, more_names: []) ⇒ Sprite
Returns a new instance of Sprite.
8 9 10 11 12 13 14 15 16 |
# File 'lib/spritesheet/spritesheet.rb', line 8 def initialize( id:, name:, type:, more_names: [] ) @id = id # zero-based index eg. 0,1,2,3, etc. @name = name @type = type @more_names = more_names end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/spritesheet/spritesheet.rb', line 6 def id @id end |
#more_names ⇒ Object (readonly)
Returns the value of attribute more_names.
6 7 8 |
# File 'lib/spritesheet/spritesheet.rb', line 6 def more_names @more_names end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/spritesheet/spritesheet.rb', line 6 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/spritesheet/spritesheet.rb', line 6 def type @type end |