Class: JSONom::Executioner
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#commands ⇒ Object
Returns the value of attribute commands.
Class Method Summary collapse
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(*args) ⇒ Executioner
constructor
A new instance of Executioner.
Constructor Details
#initialize(*args) ⇒ Executioner
Returns a new instance of Executioner.
6 7 8 9 |
# File 'lib/jsonom/executioner.rb', line 6 def initialize(*args) @args = args @commands = ArgumentParser.parse_arguments(@args) end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
3 4 5 |
# File 'lib/jsonom/executioner.rb', line 3 def args @args end |
#commands ⇒ Object
Returns the value of attribute commands.
4 5 6 |
# File 'lib/jsonom/executioner.rb', line 4 def commands @commands end |
Class Method Details
.execute(*args) ⇒ Object
11 12 13 |
# File 'lib/jsonom/executioner.rb', line 11 def self.execute(*args) new(*args).execute end |
Instance Method Details
#execute ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/jsonom/executioner.rb', line 15 def execute opfile = nil opprop = nil @commands.each_with_index do |command, index| if(command == "set_file...") opfile = @commands[index + 1] elsif(command == "get_property...") opprop = @commands[index + 1] elsif(command =~ /\Adebug\_/) JSONParser.debug(opfile, opprop) end end end |