Module: RSpec::Distrib::DelegateToMetadata
- Included in:
- ExampleGroup, ExampleResult
- Defined in:
- lib/rspec/distrib/example_group.rb
Overview
Helper to proxy getter methods to metadata attributes.
Instance Method Summary collapse
-
#delegate_to_metadata(*keys) ⇒ Object
Defines methods that fetch attributes from metadata hash.
Instance Method Details
#delegate_to_metadata(*keys) ⇒ Object
Defines methods that fetch attributes from metadata hash
9 10 11 |
# File 'lib/rspec/distrib/example_group.rb', line 9 def (*keys) keys.each { |key| define_method(key) { @metadata[key] } } end |