Class: Savagery::Spriter

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

Defined Under Namespace

Classes: Image

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Spriter

Returns a new instance of Spriter.



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

def initialize path
  self.path = path
end

Instance Attribute Details

#pathObject

Returns the value of attribute path.



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

def path
  @path
end

Instance Method Details

#sprite!Object



11
12
13
# File 'lib/savagery/spriter.rb', line 11

def sprite!
  File.write sprite_path, sprite
end