Class: BroadcastEvent::MetadataHelpers::BlockMetadataFinder

Inherits:
Object
  • Object
show all
Defined in:
app/models/broadcast_event/metadata_helpers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#blockObject (readonly)

Returns the value of attribute block.



17
18
19
# File 'app/models/broadcast_event/metadata_helpers.rb', line 17

def block
  @block
end

#nameObject (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