Class: Pixelart::Metadata::Sprite

Inherits:
Object
  • Object
show all
Defined in:
lib/pixelart/generator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, name:, type:, more_names: []) ⇒ Sprite

Returns a new instance of Sprite.



12
13
14
15
16
17
18
19
20
# File 'lib/pixelart/generator.rb', line 12

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

#idObject (readonly)

Returns the value of attribute id.



10
11
12
# File 'lib/pixelart/generator.rb', line 10

def id
  @id
end

#more_namesObject (readonly)

Returns the value of attribute more_names.



10
11
12
# File 'lib/pixelart/generator.rb', line 10

def more_names
  @more_names
end

#nameObject (readonly)

Returns the value of attribute name.



10
11
12
# File 'lib/pixelart/generator.rb', line 10

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



10
11
12
# File 'lib/pixelart/generator.rb', line 10

def type
  @type
end