Class: BroadcastEvent::MetadataHelpers::BlockMetadataFinder

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

Overview

rubocop:todo Style/Documentation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, &block) ⇒ BlockMetadataFinder

Returns a new instance of BlockMetadataFinder.


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

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

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block


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

def block
  @block
end

#nameObject (readonly)

Returns the value of attribute name


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

def name
  @name
end

Instance Method Details

#for(seed, event) ⇒ Object


23
24
25
# File 'app/models/broadcast_event/metadata_helpers.rb', line 23

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