Class: Houston::Adapters::TicketTracker::UnfuddleAdapter::Milestone
- Inherits:
-
Object
- Object
- Houston::Adapters::TicketTracker::UnfuddleAdapter::Milestone
- Defined in:
- app/adapters/houston/adapters/ticket_tracker/unfuddle_adapter/milestone.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#raw_attributes ⇒ Object
readonly
Returns the value of attribute raw_attributes.
-
#remote_id ⇒ Object
readonly
Returns the value of attribute remote_id.
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(connection, attributes) ⇒ Milestone
constructor
A new instance of Milestone.
- #update_name!(name) ⇒ Object
Constructor Details
#initialize(connection, attributes) ⇒ Milestone
Returns a new instance of Milestone.
8 9 10 11 12 13 |
# File 'app/adapters/houston/adapters/ticket_tracker/unfuddle_adapter/milestone.rb', line 8 def initialize(connection, attributes) @connection = connection @raw_attributes = attributes @remote_id = attributes["id"] @name = attributes["title"] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
15 16 17 |
# File 'app/adapters/houston/adapters/ticket_tracker/unfuddle_adapter/milestone.rb', line 15 def name @name end |
#raw_attributes ⇒ Object (readonly)
Returns the value of attribute raw_attributes.
15 16 17 |
# File 'app/adapters/houston/adapters/ticket_tracker/unfuddle_adapter/milestone.rb', line 15 def raw_attributes @raw_attributes end |
#remote_id ⇒ Object (readonly)
Returns the value of attribute remote_id.
15 16 17 |
# File 'app/adapters/houston/adapters/ticket_tracker/unfuddle_adapter/milestone.rb', line 15 def remote_id @remote_id end |
Instance Method Details
#attributes ⇒ Object
19 20 21 22 |
# File 'app/adapters/houston/adapters/ticket_tracker/unfuddle_adapter/milestone.rb', line 19 def attributes { remote_id: remote_id, name: name } end |
#update_name!(name) ⇒ Object
25 26 27 28 29 30 |
# File 'app/adapters/houston/adapters/ticket_tracker/unfuddle_adapter/milestone.rb', line 25 def update_name!(name) Houston.benchmark title: "Update Unfuddle Milestone" do milestone = ::Unfuddle::Milestone.new(raw_attributes) milestone.update_attribute("title", name) end end |