class Parser::Presenter
Attributes
data[RW]
options[RW]
Public Class Methods
new(data, options = {})
click to toggle source
# File lib/parser/presenter.rb, line 7 def initialize(data, options = {}) @data = data @options = options end
Public Instance Methods
call()
click to toggle source
# File lib/parser/presenter.rb, line 12 def call output_formatted_data end
Private Instance Methods
format_class()
click to toggle source
# File lib/parser/presenter.rb, line 18 def format_class return Formats::Average if options[:average] return Formats::UniqueVisit if options[:unique] Formats::Visit end
output_formatted_data()
click to toggle source
# File lib/parser/presenter.rb, line 24 def output_formatted_data format_class.new(data).call end