Class: Octopolo::Pivotal::StoryCommenter
- Inherits:
-
Object
- Object
- Octopolo::Pivotal::StoryCommenter
- Defined in:
- lib/octopolo/pivotal/story_commenter.rb
Instance Attribute Summary collapse
-
#comment ⇒ Object
Returns the value of attribute comment.
-
#story ⇒ Object
Returns the value of attribute story.
Instance Method Summary collapse
-
#initialize(story_id, comment) ⇒ StoryCommenter
constructor
A new instance of StoryCommenter.
- #perform ⇒ Object
Constructor Details
#initialize(story_id, comment) ⇒ StoryCommenter
Returns a new instance of StoryCommenter.
9 10 11 12 |
# File 'lib/octopolo/pivotal/story_commenter.rb', line 9 def initialize(story_id, comment) self.story = Pivotal::Client.new.find_story(story_id) self.comment = comment end |
Instance Attribute Details
#comment ⇒ Object
Returns the value of attribute comment.
7 8 9 |
# File 'lib/octopolo/pivotal/story_commenter.rb', line 7 def comment @comment end |
#story ⇒ Object
Returns the value of attribute story.
6 7 8 |
# File 'lib/octopolo/pivotal/story_commenter.rb', line 6 def story @story end |
Instance Method Details
#perform ⇒ Object
14 15 16 |
# File 'lib/octopolo/pivotal/story_commenter.rb', line 14 def perform story.notes.new(:owner => story, :text => comment).create end |