Class: Rawscsi::Query::Compound

Inherits:
Object
  • Object
show all
Includes:
Stringifier::Encode
Defined in:
lib/rawscsi/query/compound.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Stringifier::Encode

#encode

Constructor Details

#initialize(query_hash) ⇒ Compound

Returns a new instance of Compound.



7
8
9
# File 'lib/rawscsi/query/compound.rb', line 7

def initialize(query_hash)
  @query_hash = query_hash
end

Instance Attribute Details

#query_hashObject (readonly)

Returns the value of attribute query_hash.



6
7
8
# File 'lib/rawscsi/query/compound.rb', line 6

def query_hash
  @query_hash
end

Instance Method Details

#buildObject



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/rawscsi/query/compound.rb', line 11

def build
  [
    query,
    distance,
    qoptions,
    date,
    sort,
    start,
    limit,
    fields,
    "q.parser=structured"
  ].compact.join("&")
end