Class: Ehpt::CreateStories
Instance Attribute Summary collapse
-
#csv_file ⇒ Object
readonly
Returns the value of attribute csv_file.
Attributes inherited from Base
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(csv_file) ⇒ CreateStories
constructor
A new instance of CreateStories.
Methods inherited from Base
#add_error, #add_warning, call, #error?, #success?, #warning?
Constructor Details
#initialize(csv_file) ⇒ CreateStories
Returns a new instance of CreateStories.
5 6 7 8 |
# File 'lib/ehpt/create_stories.rb', line 5 def initialize(csv_file) @csv_file = csv_file super end |
Instance Attribute Details
#csv_file ⇒ Object (readonly)
Returns the value of attribute csv_file.
3 4 5 |
# File 'lib/ehpt/create_stories.rb', line 3 def csv_file @csv_file end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 |
# File 'lib/ehpt/create_stories.rb', line 10 def call validate_csv_file! create_stories unless error? rescue StandardError => e add_error(e.) end |