Class: Ehpt
- Inherits:
-
Object
- Object
- Ehpt
- Defined in:
- lib/ehpt.rb,
lib/ehpt/base.rb,
lib/ehpt/get_project.rb,
lib/ehpt/create_story.rb,
lib/ehpt/create_stories.rb
Defined Under Namespace
Classes: Base, CreateStories, CreateStory, GetProject
Instance Attribute Summary collapse
-
#csv_file ⇒ Object
readonly
Returns the value of attribute csv_file.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(csv_file, token, project_id) ⇒ Ehpt
constructor
A new instance of Ehpt.
Constructor Details
#initialize(csv_file, token, project_id) ⇒ Ehpt
Returns a new instance of Ehpt.
9 10 11 12 |
# File 'lib/ehpt.rb', line 9 def initialize(csv_file, token, project_id) @csv_file = csv_file @project = get_project_by(token, project_id) end |
Instance Attribute Details
#csv_file ⇒ Object (readonly)
Returns the value of attribute csv_file.
7 8 9 |
# File 'lib/ehpt.rb', line 7 def csv_file @csv_file end |
#project ⇒ Object (readonly)
Returns the value of attribute project.
7 8 9 |
# File 'lib/ehpt.rb', line 7 def project @project end |
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/ehpt.rb', line 14 def call stories_creator = Ehpt::CreateStories.new(csv_file, project) stories_creator.call puts "Done" if stories_creator.error? puts "===== Errors =====" pp stories_creator.errors end end |