Class: Rafflesia::MoleculeSearchRequest
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::MoleculeSearchRequest
- Defined in:
- lib/rafflesia/molecules/molecule_search_request.rb
Constant Summary collapse
- HASH_ATTRS =
{ backend: :backend, db: :db, max_hits: :max_hits, query: :query }.freeze
Instance Attribute Summary collapse
-
#backend ⇒ Object
Returns the value of attribute backend.
-
#db ⇒ Object
Returns the value of attribute db.
-
#max_hits ⇒ Object
Returns the value of attribute max_hits.
-
#query ⇒ Object
Returns the value of attribute query.
Instance Method Summary collapse
-
#initialize(json) ⇒ MoleculeSearchRequest
constructor
A new instance of MoleculeSearchRequest.
Constructor Details
#initialize(json) ⇒ MoleculeSearchRequest
Returns a new instance of MoleculeSearchRequest.
21 22 23 24 25 26 27 28 |
# File 'lib/rafflesia/molecules/molecule_search_request.rb', line 21 def initialize(json) super() hash = self.class.normalize(json) @backend = hash[:backend] @db = hash[:db] @max_hits = hash[:max_hits] @query = hash[:query] end |
Instance Attribute Details
#backend ⇒ Object
Returns the value of attribute backend.
15 16 17 |
# File 'lib/rafflesia/molecules/molecule_search_request.rb', line 15 def backend @backend end |
#db ⇒ Object
Returns the value of attribute db.
15 16 17 |
# File 'lib/rafflesia/molecules/molecule_search_request.rb', line 15 def db @db end |
#max_hits ⇒ Object
Returns the value of attribute max_hits.
15 16 17 |
# File 'lib/rafflesia/molecules/molecule_search_request.rb', line 15 def max_hits @max_hits end |
#query ⇒ Object
Returns the value of attribute query.
15 16 17 |
# File 'lib/rafflesia/molecules/molecule_search_request.rb', line 15 def query @query end |