Module: BroadcastEvent::MetadataHelpers::MetadatableClassMethods
- Included in:
- BroadcastEvent
- Defined in:
- app/models/broadcast_event/metadata_helpers.rb
Instance Method Summary collapse
Instance Method Details
#has_metadata(key, method = nil, &block) ⇒ Object
30 31 32 33 34 35 |
# File 'app/models/broadcast_event/metadata_helpers.rb', line 30 def (key, method = nil, &block) return << SimpleMetadataFinder.new(key, method) unless method.nil? return << BlockMetadataFinder.new(key, &block) unless block.nil? raise StandardError, "No block or method defined for #{key} on #{name}" end |
#metadata_finders ⇒ Object
37 38 39 |
# File 'app/models/broadcast_event/metadata_helpers.rb', line 37 def @metadata_finders ||= [] end |