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


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

def initialize(name, &block)
  @name = name.to_s
  @block = block
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block


15
16
17
# File 'app/models/broadcast_event/metadata_helpers.rb', line 15

def block
  @block
end

#nameObject (readonly)

Returns the value of attribute name


15
16
17
# File 'app/models/broadcast_event/metadata_helpers.rb', line 15

def name
  @name
end

Instance Method Details

#for(seed, event) ⇒ Object


21
22
23
# File 'app/models/broadcast_event/metadata_helpers.rb', line 21

def for(seed, event)
  [name, block.call(seed, event)]
end