class SlackTrello::TrelloHelpers::CopyCards
Attributes
destination_board[R]
destination_list[R]
source_board[R]
source_list[R]
Public Class Methods
new(args)
click to toggle source
# File lib/slack_trello/trello_helpers/copy_cards.rb, line 5 def initialize(args) @source_board = args.fetch(:source_board) @source_list = args.fetch(:source_list) @destination_board = args.fetch(:destination_board) @destination_list = args.fetch(:destination_list) end
Public Instance Methods
run()
click to toggle source
# File lib/slack_trello/trello_helpers/copy_cards.rb, line 12 def run source_cards.each do |source_card| creator = CreateCard.new(board_name: destination_board, list_name: destination_list, card_name: source_card.name) creator.first_or_create end end
source_cards()
click to toggle source
# File lib/slack_trello/trello_helpers/copy_cards.rb, line 19 def source_cards l = Lookup.list(source_board, source_list) l.cards end