Class: CopyBot::StepDefinitions
- Inherits:
-
Object
- Object
- CopyBot::StepDefinitions
- Defined in:
- lib/copy_bot/step_definitions.rb
Instance Attribute Summary collapse
- #loaded_step_definitions ⇒ Hash readonly
Instance Method Summary collapse
-
#initialize ⇒ StepDefinitions
constructor
A new instance of StepDefinitions.
- #load_step_definitions_file(step_definitions_file_path) ⇒ Hash
- #steps ⇒ Hash
Constructor Details
#initialize ⇒ StepDefinitions
Returns a new instance of StepDefinitions.
6 7 8 |
# File 'lib/copy_bot/step_definitions.rb', line 6 def initialize @loaded_step_definitions = {} end |
Instance Attribute Details
#loaded_step_definitions ⇒ Hash (readonly)
4 5 6 |
# File 'lib/copy_bot/step_definitions.rb', line 4 def loaded_step_definitions @loaded_step_definitions end |
Instance Method Details
#load_step_definitions_file(step_definitions_file_path) ⇒ Hash
12 13 14 15 |
# File 'lib/copy_bot/step_definitions.rb', line 12 def load_step_definitions_file(step_definitions_file_path) @loaded_step_definitions = YAML.safe_load(ERB.new(File.read(step_definitions_file_path)).result) .deep_symbolize_keys end |
#steps ⇒ Hash
18 19 20 |
# File 'lib/copy_bot/step_definitions.rb', line 18 def steps loaded_step_definitions[:steps] end |