Class: IODDoc
- Inherits:
-
Object
- Object
- IODDoc
- Defined in:
- lib/iodruby.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#entities ⇒ Object
Returns the value of attribute entities.
-
#sentiment ⇒ Object
Returns the value of attribute sentiment.
Instance Method Summary collapse
-
#initialize(data) ⇒ IODDoc
constructor
A new instance of IODDoc.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(data) ⇒ IODDoc
Returns a new instance of IODDoc.
352 353 354 355 356 |
# File 'lib/iodruby.rb', line 352 def initialize(data) #@query=query @entities=Hash.new @data=data end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
349 350 351 |
# File 'lib/iodruby.rb', line 349 def data @data end |
#entities ⇒ Object
Returns the value of attribute entities.
351 352 353 |
# File 'lib/iodruby.rb', line 351 def entities @entities end |
#sentiment ⇒ Object
Returns the value of attribute sentiment.
350 351 352 |
# File 'lib/iodruby.rb', line 350 def sentiment @sentiment end |
Instance Method Details
#to_json(options = {}) ⇒ Object
358 359 360 |
# File 'lib/iodruby.rb', line 358 def to_json(={}) return render :json => JSON::dump(@data) end |