Class: BroadcastEvent::MetadataHelpers::BlockMetadataFinder
- Inherits:
-
Object
- Object
- BroadcastEvent::MetadataHelpers::BlockMetadataFinder
- Defined in:
- app/models/broadcast_event/metadata_helpers.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #for(seed, event) ⇒ Object
-
#initialize(name, &block) ⇒ BlockMetadataFinder
constructor
A new instance of BlockMetadataFinder.
Constructor Details
#initialize(name, &block) ⇒ BlockMetadataFinder
Returns a new instance of BlockMetadataFinder.
19 20 21 22 |
# File 'app/models/broadcast_event/metadata_helpers.rb', line 19 def initialize(name, &block) @name = name.to_s @block = block end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
17 18 19 |
# File 'app/models/broadcast_event/metadata_helpers.rb', line 17 def block @block end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
17 18 19 |
# File 'app/models/broadcast_event/metadata_helpers.rb', line 17 def name @name end |
Instance Method Details
#for(seed, event) ⇒ Object
24 25 26 |
# File 'app/models/broadcast_event/metadata_helpers.rb', line 24 def for(seed, event) [name, block.call(seed, event)] end |