Class: Ehpt

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_fileObject (readonly)

Returns the value of attribute csv_file.



7
8
9
# File 'lib/ehpt.rb', line 7

def csv_file
  @csv_file
end

#projectObject (readonly)

Returns the value of attribute project.



7
8
9
# File 'lib/ehpt.rb', line 7

def project
  @project
end

Instance Method Details

#callObject



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