Class: Sprite::Runner
- Inherits:
-
Object
- Object
- Sprite::Runner
- Defined in:
- lib/sprite/runner.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(args) ⇒ Runner
constructor
A new instance of Runner.
-
#run! ⇒ Object
run sprite creator.
- #set_options(args) ⇒ Object
Constructor Details
#initialize(args) ⇒ Runner
Returns a new instance of Runner.
5 6 7 |
# File 'lib/sprite/runner.rb', line 5 def initialize(args) self. = (args) end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
4 5 6 |
# File 'lib/sprite/runner.rb', line 4 def @options end |
Instance Method Details
#run! ⇒ Object
run sprite creator
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/sprite/runner.rb', line 19 def run! begin Sprite::Builder.from_config([:path]).build # rescue Exception => e # # catch errors # puts "ERROR" # puts e # return 1 end 0 end |
#set_options(args) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/sprite/runner.rb', line 9 def (args) opts = {} # TODO # edit options with passed in args opts[:path] = args.first if args.any? opts end |