class Rawscsi::Stringifier::Compound
Attributes
bool_hash[R]
Public Class Methods
new(bool_hash)
click to toggle source
# File lib/rawscsi/stringifier/compound.rb, line 8 def initialize(bool_hash) @bool_hash = bool_hash end
Public Instance Methods
build()
click to toggle source
# File lib/rawscsi/stringifier/compound.rb, line 12 def build bool_op = bool_hash.keys.first ar = bool_hash[bool_op] "(#{bool_op}" + encode(" #{bool_map(ar)}") + ")" end
Private Instance Methods
bool_map(value)
click to toggle source
# File lib/rawscsi/stringifier/compound.rb, line 20 def bool_map(value) output = "" if value.kind_of?(Enumerable) value.each do |v| output << Rawscsi::Query::Stringifier.new(v).build end else output = Rawscsi::Query::Stringifier.new(v).build end output end