Class: Tempo::Views::Formatters::Base
- Inherits:
-
Object
- Object
- Tempo::Views::Formatters::Base
- Defined in:
- lib/tempo/views/formatters/base.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#format_records(records, options = {}) ⇒ Object
Here we check if our class methods include a proc block to handle the particular record type.
Instance Method Details
#format_records(records, options = {}) ⇒ Object
Here we check if our class methods include a proc block to handle the particular record type. See View Records for all possible record types. See screen formatter for examples of proc blocks.
20 21 22 23 24 25 26 |
# File 'lib/tempo/views/formatters/base.rb', line 20 def format_records(records, ={}) @options = records.each do |record| class_block = "#{record.type}_block" send( class_block, record ) if respond_to? class_block end end |