Class: Story
- Inherits:
-
Object
- Object
- Story
- Includes:
- HappyMapper
- Defined in:
- lib/pivotal-tracker.rb,
lib/pivotal-tracker/story.rb
Overview
initial definition, to avoid circular dependencies when declaring happymappings
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Story
constructor
A new instance of Story.
- #to_param ⇒ Object
- #to_xml(options = {}) ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ Story
Returns a new instance of Story.
16 17 18 19 20 |
# File 'lib/pivotal-tracker/story.rb', line 16 def initialize(attributes = {}) attributes.each do |key, value| send("#{key}=", value) end end |
Instance Method Details
#to_param ⇒ Object
31 32 33 |
# File 'lib/pivotal-tracker/story.rb', line 31 def to_param id.to_s end |
#to_xml(options = {}) ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/pivotal-tracker/story.rb', line 22 def to_xml( = {}) builder = Builder::XmlMarkup.new() builder.story do |story| story.id id.to_s if id story.type type.to_s if type story.name name.to_s if name end end |