Class: Savagery::Spriter::Image

Inherits:
Struct
  • Object
show all
Defined in:
lib/savagery/spriter/image.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



3
4
5
# File 'lib/savagery/spriter/image.rb', line 3

def path
  @path
end

Class Method Details

.from_paths(paths) ⇒ Object



4
5
6
# File 'lib/savagery/spriter/image.rb', line 4

def self.from_paths paths
  paths.map { |path| Image.new(path) }
end

Instance Method Details

#symbolObject



8
9
10
# File 'lib/savagery/spriter/image.rb', line 8

def symbol
  %(<symbol id="#{name}">#{image}</symbol>\n)
end