Class: Ehpt::CreateStory
Instance Attribute Summary collapse
-
#project ⇒ Object
readonly
Returns the value of attribute project.
-
#story_attrs ⇒ Object
readonly
Returns the value of attribute story_attrs.
Attributes inherited from Base
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(project, story_attrs) ⇒ CreateStory
constructor
A new instance of CreateStory.
Methods inherited from Base
#add_error, call, #error?, #success?
Constructor Details
#initialize(project, story_attrs) ⇒ CreateStory
Returns a new instance of CreateStory.
7 8 9 10 11 |
# File 'lib/ehpt/create_story.rb', line 7 def initialize(project, story_attrs) @project = project @story_attrs = story_attrs super end |
Instance Attribute Details
#project ⇒ Object (readonly)
Returns the value of attribute project.
5 6 7 |
# File 'lib/ehpt/create_story.rb', line 5 def project @project end |
#story_attrs ⇒ Object (readonly)
Returns the value of attribute story_attrs.
5 6 7 |
# File 'lib/ehpt/create_story.rb', line 5 def story_attrs @story_attrs end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 |
# File 'lib/ehpt/create_story.rb', line 13 def call create_story prefix_story_name_with_id rescue StandardError => e add_error(eval(e.)[:body]) end |