Class: Rawscsi::Query::Stringifier

Inherits:
Object
  • Object
show all
Defined in:
lib/rawscsi/query/stringifier.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bool_hash) ⇒ Stringifier

Returns a new instance of Stringifier.



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

def initialize(bool_hash)
  @bool_hash = bool_hash
end

Instance Attribute Details

#bool_hashObject (readonly)

Returns the value of attribute bool_hash.



4
5
6
# File 'lib/rawscsi/query/stringifier.rb', line 4

def bool_hash
  @bool_hash
end

Instance Method Details

#buildObject



10
11
12
13
14
15
16
# File 'lib/rawscsi/query/stringifier.rb', line 10

def build
  if compound?(bool_hash)
    Rawscsi::Stringifier::Compound.new(bool_hash).build
  else
    Rawscsi::Stringifier::Simple.new(bool_hash).build
  end
end