Class: Everhour2toggl::Everhour
- Inherits:
-
Object
- Object
- Everhour2toggl::Everhour
- Defined in:
- lib/everhour2toggl/everhour.rb
Instance Method Summary collapse
- #export ⇒ Object
-
#initialize(from:, to:, fields:, apikey:) ⇒ Everhour
constructor
A new instance of Everhour.
Constructor Details
#initialize(from:, to:, fields:, apikey:) ⇒ Everhour
Returns a new instance of Everhour.
8 9 10 11 12 13 |
# File 'lib/everhour2toggl/everhour.rb', line 8 def initialize(from:, to:, fields:, apikey:) @from = from @to = to @fields = fields @apikey = apikey end |
Instance Method Details
#export ⇒ Object
15 16 17 18 19 |
# File 'lib/everhour2toggl/everhour.rb', line 15 def export output_path = "everhour_entries" file_generator = Everhour2toggl::FileGenerator.new(output: output_path, filename: "#{@from}-#{@to}-#{@fields}.json") file_generator.generate(exported_time_str) end |