Class: MongoParty
- Inherits:
-
Object
- Object
- MongoParty
- Defined in:
- lib/asterank-ruby/mongo_party.rb
Direct Known Subclasses
Asterank::API::Asterank, Asterank::API::Kepler, Asterank::API::MPC
Instance Attribute Summary collapse
-
#results ⇒ Object
readonly
Returns the value of attribute results.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize ⇒ MongoParty
constructor
A new instance of MongoParty.
Constructor Details
#initialize ⇒ MongoParty
Returns a new instance of MongoParty.
5 6 7 |
# File 'lib/asterank-ruby/mongo_party.rb', line 5 def initialize @results = nil end |
Instance Attribute Details
#results ⇒ Object (readonly)
Returns the value of attribute results.
3 4 5 |
# File 'lib/asterank-ruby/mongo_party.rb', line 3 def results @results end |
Instance Method Details
#execute ⇒ Object
13 14 15 16 17 18 |
# File 'lib/asterank-ruby/mongo_party.rb', line 13 def execute limit = [:limit] || 10 query = {query: selector.to_json, limit: limit} @results = self.class.get('', query: query) return @results end |