Class: TrelloFreestyler::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/trello_freestyler/options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, token, url, board_id, action_types, output, timezone) ⇒ Options

rubocop:disable Metrics/ParameterLists



9
10
11
12
13
14
15
16
17
18
# File 'lib/trello_freestyler/options.rb', line 9

def initialize(key, token, url, board_id, action_types, output, timezone)
  @key = key
  @token = token
  @url = url || 'https://api.trello.com/1'
  @board_id = board_id
  @action_types = action_types ||
                  'addMemberToCard,removeMemberFromCard,createCard,moveCardFromBoard,moveCardToBoard,updateCard'
  @output = output || '.output'
  @timezone = TZInfo::Timezone.get((timezone || 'Australia/Melbourne'))
end

Instance Attribute Details

#action_typesObject

Returns the value of attribute action_types.



6
7
8
# File 'lib/trello_freestyler/options.rb', line 6

def action_types
  @action_types
end

#board_idObject

Returns the value of attribute board_id.



6
7
8
# File 'lib/trello_freestyler/options.rb', line 6

def board_id
  @board_id
end

#keyObject

Returns the value of attribute key.



6
7
8
# File 'lib/trello_freestyler/options.rb', line 6

def key
  @key
end

#outputObject

Returns the value of attribute output.



6
7
8
# File 'lib/trello_freestyler/options.rb', line 6

def output
  @output
end

#timezoneObject

Returns the value of attribute timezone.



6
7
8
# File 'lib/trello_freestyler/options.rb', line 6

def timezone
  @timezone
end

#tokenObject

Returns the value of attribute token.



6
7
8
# File 'lib/trello_freestyler/options.rb', line 6

def token
  @token
end

#urlObject

Returns the value of attribute url.



6
7
8
# File 'lib/trello_freestyler/options.rb', line 6

def url
  @url
end

Instance Method Details

#==(other) ⇒ Object

rubocop:enable Metrics/ParameterLists



21
22
23
24
25
26
27
28
29
# File 'lib/trello_freestyler/options.rb', line 21

def ==(other)
  key == other.key &&
    token == other.token &&
    url == other.url &&
    board_id == other.board_id &&
    action_types == other.action_types &&
    output == other.output &&
    timezone == other.timezone
end