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