Class: BroadcastEvent::MetadataHelpers::SimpleMetadataFinder
- Inherits:
-
Object
- Object
- BroadcastEvent::MetadataHelpers::SimpleMetadataFinder
- Defined in:
- app/models/broadcast_event/metadata_helpers.rb
Instance Attribute Summary collapse
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #for(seed, _event) ⇒ Object
-
#initialize(name, method) ⇒ SimpleMetadataFinder
constructor
A new instance of SimpleMetadataFinder.
Constructor Details
#initialize(name, method) ⇒ SimpleMetadataFinder
Returns a new instance of SimpleMetadataFinder.
6 7 8 9 |
# File 'app/models/broadcast_event/metadata_helpers.rb', line 6 def initialize(name, method) @name = name.to_s @method = method end |
Instance Attribute Details
#method ⇒ Object (readonly)
Returns the value of attribute method.
4 5 6 |
# File 'app/models/broadcast_event/metadata_helpers.rb', line 4 def method @method end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'app/models/broadcast_event/metadata_helpers.rb', line 4 def name @name end |
Instance Method Details
#for(seed, _event) ⇒ Object
11 12 13 |
# File 'app/models/broadcast_event/metadata_helpers.rb', line 11 def for(seed, _event) [name, seed.send(method)] end |