Class: LessNeglectApi::Event

Inherits:
ApiObject show all
Defined in:
lib/lessneglect/objects/event.rb

Direct Known Subclasses

ActionEvent, Message

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ApiObject

#initialize

Constructor Details

This class inherits a constructor from LessNeglectApi::ApiObject

Instance Attribute Details

#magnitudeObject

Returns the value of attribute magnitude.



4
5
6
# File 'lib/lessneglect/objects/event.rb', line 4

def magnitude
  @magnitude
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/lessneglect/objects/event.rb', line 4

def name
  @name
end

Instance Method Details

#as_json(options = {}) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/lessneglect/objects/event.rb', line 6

def as_json(options={})
  {
    :name => self.name,
    :magnitude => self.magnitude,
    :source => "lessneglect-ruby:0.3.5" # version of this logging library
  }.as_json(options)
end