class Timetrap::Formatters::Harvest
Attributes
client[W]
config[W]
entries[R]
Public Class Methods
new(entries)
click to toggle source
# File lib/timetrap-harvest.rb, line 21 def initialize(entries) @entries = entries end
Public Instance Methods
output()
click to toggle source
# File lib/timetrap-harvest.rb, line 25 def output results = entries.map { |entry| TimetrapHarvest::Formatter.new(entry, config).format } harvester = TimetrapHarvest::Harvester.new(results, client) results = harvester.harvest TimetrapHarvest::Output.new(results).generate end
Private Instance Methods
client()
click to toggle source
# File lib/timetrap-harvest.rb, line 40 def client @client ||= TimetrapHarvest::NetworkClient.new(config) end
config()
click to toggle source
# File lib/timetrap-harvest.rb, line 36 def config @config ||= TimetrapHarvest::Config.new end