Class: PivotalToTrello::Core
- Inherits:
-
Object
- Object
- PivotalToTrello::Core
- Defined in:
- lib/pivotal_to_trello/core.rb
Overview
The core entry point of the gem, which handles the import process.
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the options struct.
Instance Method Summary collapse
-
#import! ⇒ Object
Imports a Pivotal project into Trello.
-
#initialize(options = OpenStruct.new) ⇒ Core
constructor
Constructor.
Constructor Details
#initialize(options = OpenStruct.new) ⇒ Core
Constructor
10 11 12 |
# File 'lib/pivotal_to_trello/core.rb', line 10 def initialize( = OpenStruct.new) = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the options struct.
30 31 32 |
# File 'lib/pivotal_to_trello/core.rb', line 30 def end |
Instance Method Details
#import! ⇒ Object
Imports a Pivotal project into Trello.
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/pivotal_to_trello/core.rb', line 15 def import! prompt_for_details puts "\nBeginning import..." pivotal.stories(.pivotal_project_id).each do |story| list_id = get_list_id(story, ) next unless list_id card = trello.create_card(list_id, story) label_color = get_label_color(story, ) trello.add_label(card, story.story_type, label_color) unless label_color.nil? end end |