Class: Lucid::StepDefinitions
Instance Method Summary collapse
-
#initialize(context = Context.default) ⇒ StepDefinitions
constructor
A new instance of StepDefinitions.
- #to_json ⇒ Object
Constructor Details
#initialize(context = Context.default) ⇒ StepDefinitions
Returns a new instance of StepDefinitions.
3 4 5 6 7 |
# File 'lib/lucid/step_definitions.rb', line 3 def initialize(context = Context.default) context = Context.parse(context) @orchestrator = ContextLoader::Orchestrator.new(nil, false) @orchestrator.load_files_from_paths(context.autoload_code_paths) end |
Instance Method Details
#to_json ⇒ Object
9 10 11 |
# File 'lib/lucid/step_definitions.rb', line 9 def to_json @orchestrator.step_definitions.map{|stepdef| stepdef.to_hash}.to_json end |