Class: LessNeglectApi::ActionEvent
- Defined in:
- lib/lessneglect/objects/action_event.rb
Instance Attribute Summary collapse
-
#external_identifier ⇒ Object
Returns the value of attribute external_identifier.
-
#extras ⇒ Object
Returns the value of attribute extras.
-
#links ⇒ Object
Returns the value of attribute links.
-
#note ⇒ Object
Returns the value of attribute note.
Attributes inherited from Event
Instance Method Summary collapse
Methods inherited from ApiObject
Constructor Details
This class inherits a constructor from LessNeglectApi::ApiObject
Instance Attribute Details
#external_identifier ⇒ Object
Returns the value of attribute external_identifier.
4 5 6 |
# File 'lib/lessneglect/objects/action_event.rb', line 4 def external_identifier @external_identifier end |
#extras ⇒ Object
Returns the value of attribute extras.
4 5 6 |
# File 'lib/lessneglect/objects/action_event.rb', line 4 def extras @extras end |
#links ⇒ Object
Returns the value of attribute links.
4 5 6 |
# File 'lib/lessneglect/objects/action_event.rb', line 4 def links @links end |
#note ⇒ Object
Returns the value of attribute note.
4 5 6 |
# File 'lib/lessneglect/objects/action_event.rb', line 4 def note @note end |
Instance Method Details
#add_link(name, href) ⇒ Object
6 7 8 9 |
# File 'lib/lessneglect/objects/action_event.rb', line 6 def add_link(name, href) self.links ||= [] self.links << ActionLink.new({ :name => name, :href => href }) end |
#as_json(options = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/lessneglect/objects/action_event.rb', line 11 def as_json(={}) super.merge({ :klass => "actionevent", :note => self.note, :external_identifier => self.external_identifier, :extras => self.extras, :links => self.links.nil? ? nil : self.links.as_json }).as_json() end |