Module: TimeTrello

Defined in:
lib/time_trello/duration.rb,
lib/time_trello.rb,
lib/time_trello/parser.rb,
lib/time_trello/report.rb,
lib/time_trello/version.rb,
lib/time_trello/trello_driver.rb,
lib/time_trello/activity_record.rb

Overview

--ruby-- Copyright © 2016 - Formaweb - All rights reserved

Author

Ronaldo Faria Lima

Created

2016-03-21

Describes a duration in hours and minutes and proper operations using those.

Defined Under Namespace

Classes: ActivityRecord, Duration, Parser, Report, TrelloDriver

Constant Summary collapse

VERSION =
'1.0.0'

Class Method Summary collapse

Class Method Details

.find_all(start_date, end_date, board_id, &filter) ⇒ Object

Public: Generates the report based on the provided parameters.

start_date - The start date to limit the results. end_date - The end date to limit the results. board_id - Identification of the board that should be parsed in order to

return results.

filter - A block containing a filter for the results. The block must receive

a parameter which is an instance of ActivityRecord.


42
43
44
# File 'lib/time_trello.rb', line 42

def self.find_all(start_date, end_date, board_id, &filter)
  (Report.new(start_date, end_date, board_id, @prefix)).find_all(&filter)
end

.initialize(public_key, member_token, prefix = ':clock12:') ⇒ Object



26
27
28
29
30
31
32
# File 'lib/time_trello.rb', line 26

def self.initialize(public_key, member_token, prefix = ':clock12:')
  @prefix = prefix
  Trello.configure do |config|
    config.developer_public_key = public_key
    config.member_token = member_token
  end
end