Class: TrelloBranch
- Inherits:
-
Object
- Object
- TrelloBranch
- Defined in:
- lib/trello_branch.rb
Instance Attribute Summary collapse
-
#board ⇒ Object
readonly
Returns the value of attribute board.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
- #checkout_card(short_id) ⇒ Object
-
#initialize(board_id) ⇒ TrelloBranch
constructor
A new instance of TrelloBranch.
Constructor Details
#initialize(board_id) ⇒ TrelloBranch
Returns a new instance of TrelloBranch.
8 9 10 11 |
# File 'lib/trello_branch.rb', line 8 def initialize(board_id) @board = Trello::Board.find(board_id) @logger = Logger.new(STDOUT) end |
Instance Attribute Details
#board ⇒ Object (readonly)
Returns the value of attribute board.
6 7 8 |
# File 'lib/trello_branch.rb', line 6 def board @board end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
6 7 8 |
# File 'lib/trello_branch.rb', line 6 def logger @logger end |
Instance Method Details
#checkout_card(short_id) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/trello_branch.rb', line 13 def checkout_card(short_id) logger.info "TrelloBranch: Looking up card ##{short_id}" c = card(short_id) branch_name = branch_name_for_card(c) logger.info "TrelloBranch: Checking out branch: #{branch_name}" checkout_branch(branch_name) end |