Class: CommandProcessor::Command
- Inherits:
-
Object
- Object
- CommandProcessor::Command
- Defined in:
- lib/command_processor/command.rb
Instance Method Summary collapse
Instance Method Details
#to_params(filtered = []) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/command_processor/command.rb', line 3 def to_params(filtered=[]) instance_variables.inject({}) do |memo, ivar| key = ivar.to_s.delete("@") value = instance_variable_get(ivar) memo.merge(key => value) end end |