Class: BroadcastEvent::MetadataHelpers::SimpleMetadataFinder

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, method) ⇒ SimpleMetadataFinder


4
5
6
7
# File 'app/models/broadcast_event/metadata_helpers.rb', line 4

def initialize(name, method)
  @name = name.to_s
  @method = method
end

Instance Attribute Details

#methodObject (readonly)

Returns the value of attribute method


3
4
5
# File 'app/models/broadcast_event/metadata_helpers.rb', line 3

def method
  @method
end

#nameObject (readonly)

Returns the value of attribute name


3
4
5
# File 'app/models/broadcast_event/metadata_helpers.rb', line 3

def name
  @name
end

Instance Method Details

#for(seed, _event) ⇒ Object


9
10
11
# File 'app/models/broadcast_event/metadata_helpers.rb', line 9

def for(seed, _event)
  [name, seed.send(method)]
end