lib/trello_helper.rb
##
# Adds +Trello+ API objects that have been parsed and loaded into a
# +TrelloJsonLoader+ object
#
# +json_loader+ is a +TrelloJsonLoader+ that has been populated with
# +Trello+ API objects
Adds +Trello+ API objects that have been parsed and loaded into a
+TrelloJsonLoader+ object


Adds + Trello + API objects that have been parsed and loaded into a + TrelloJsonLoader + object
def add_json_loader_content(json_loader)
    @org = json_loader.organizations_by_id.values.select { |o| o.name == organization_id }.first
    @org_members = json_loader.organization_members
    json_loader.boards_by_id.values().each { |d| add_board(d) }
    json_loader.labels_by_id.values().each { |d| add_label(d) }
    json_loader.members_by_id.values().each { |d| add_member(d) }
    json_loader.cards_by_id.values().each { |d| add_card(d) }
    json_loader.checklists_by_id.values().each { |d|
      add_checklist(d, json_loader.checklist_id_to_card_id)
    }
    json_loader.lists_by_id.values().each { |d| add_list(d) }
  end
def add_json_loader_content ( json_loader ) @org = json_loader . organizations_by_id . values . select { | o | o . name == organization_id } . first @org_members = json_loader . organization_members json_loader . boards_by_id . values ( ) . each { | d | add_board ( d ) } json_loader . labels_by_id . values ( ) . each { | d | add_label ( d ) } json_loader . members_by_id . values ( ) . each { | d | add_member ( d ) } json_loader . cards_by_id . values ( ) . each { | d | add_card ( d ) } json_loader . checklists_by_id . values ( ) . each { | d | add_checklist ( d , json_loader . checklist_id_to_card_id ) } json_loader . lists_by_id . values ( ) . each { | d | add_list ( d ) } end
Adds +Trello+ API objects that have been parsed and loaded into a
+TrelloJsonLoader+ object
Adds + Trello + API objects that have been parsed and loaded into a + TrelloJsonLoader + object
# We only have one org, so load it if it's there # org members are a special case, since they're loaded as an array
json_loader