class Trelloize
Attributes
config[RW]
directory[RW]
trello[RW]
Public Class Methods
new(directory = Dir.pwd.to_s)
click to toggle source
# File lib/totrello/trelloize.rb, line 10 def initialize(directory = Dir.pwd.to_s) @trello = TrelloBuilder.new @directory = directory @config = TrelloConfig.new(directory) end
Public Instance Methods
description(todo, config)
click to toggle source
# File lib/totrello/trelloize.rb, line 16 def description(todo, config) return '' if todo.nil? out = 'TODO item found by the ' out += "[ToTrello](https://rubygems.org/gems/totrello) gem\n" out += "**Project name:** #{config.project_name}\n" out += "**Filename**: #{todo[:file]}\n" out += "**Action item**: #{todo[:todo]}\n" out + "**Location (at or near) line**: #{todo[:line_number]}\n" end
find_and_create_cards_from_todos(todos, board)
click to toggle source
# File lib/totrello/trelloize.rb, line 26 def find_and_create_cards_from_todos(todos, board) todos.each do |todo| description = description(todo, @config) @trello.create_card(board, todo[:todo], description, @config.default_list) end end