Module: SimpleConsole::TestHelper
- Defined in:
- lib/helper.rb
Instance Method Summary collapse
Instance Method Details
#initialize_data ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/helper.rb', line 11 def initialize_data @control.instance_variables.each do |var| define_method(var.to_s.gsub("^@", "")) do return @control.instance_variable_get(var) end end end |
#output ⇒ Object
7 8 9 |
# File 'lib/helper.rb', line 7 def output return @output.string end |
#run(action, params) ⇒ Object
2 3 4 5 |
# File 'lib/helper.rb', line 2 def run(action, params) @control.params = params SimpleConsole::Application.run([action.to_sym], @control, @view) end |