Class: Hope::Source::Base
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/hope/source/base.rb', line 4 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/hope/source/base.rb', line 4 def @options end |
Class Method Details
.event_types ⇒ Object
6 7 8 |
# File 'lib/hope/source/base.rb', line 6 def self.event_types [] end |
Instance Method Details
#parse(m) ⇒ Object
25 26 27 |
# File 'lib/hope/source/base.rb', line 25 def parse m JSON.parse m end |
#serializable_hash ⇒ Object
Misc
11 12 13 14 15 16 17 18 19 |
# File 'lib/hope/source/base.rb', line 11 def serializable_hash { :id => @name, :name => @name, :type => self.class.name, :options => @options, :received => @received } end |
#to_json ⇒ Object
21 22 23 |
# File 'lib/hope/source/base.rb', line 21 def to_json serializable_hash.to_json end |