Method: ObjectiveCommand::Datas::Factory#new_command_data
- Defined in:
- lib/objective_command/datas/factory.rb
#new_command_data(*a, &b) ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/objective_command/datas/factory.rb', line 22 def new_command_data ( *a, &b ) data = @command_data_class.new(*a, &b) instance_variables.each do |var| next if var == '@command_data_class' next if var =~ /^@__/ val = instance_variable_get(var) data.send(var[1..-1] + '=', val) unless val.nil? end data end |