Class: Slurper::Engine
- Inherits:
-
Struct
- Object
- Struct
- Slurper::Engine
- Defined in:
- lib/slurper/engine.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#story_file ⇒ Object
Returns the value of attribute story_file.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Engine
constructor
A new instance of Engine.
- #process ⇒ Object
- #stories ⇒ Object
Constructor Details
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
4 5 6 |
# File 'lib/slurper/engine.rb', line 4 def client @client end |
#story_file ⇒ Object
Returns the value of attribute story_file
2 3 4 |
# File 'lib/slurper/engine.rb', line 2 def story_file @story_file end |
Instance Method Details
#process ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/slurper/engine.rb', line 17 def process puts "Validating story content" stories.each(&:valid?) puts "Preparing to slurp #{stories.size} stories into Trello..." stories.each_with_index do |story, index| if client.create_card(story) puts "#{index+1}. #{story.name}" else puts "Slurp failed. #{story.}" end end end |