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

Returns a new instance of SimpleMetadataFinder.



6
7
8
9
# File 'app/models/broadcast_event/metadata_helpers.rb', line 6

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

Instance Attribute Details

#methodObject (readonly)

Returns the value of attribute method.



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

def method
  @method
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#for(seed, _event) ⇒ Object



11
12
13
# File 'app/models/broadcast_event/metadata_helpers.rb', line 11

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