Class: Rawscsi::Stringifier::Compound
- Inherits:
-
Object
- Object
- Rawscsi::Stringifier::Compound
- Includes:
- Encode
- Defined in:
- lib/rawscsi/stringifier/compound.rb
Instance Attribute Summary collapse
-
#bool_hash ⇒ Object
readonly
Returns the value of attribute bool_hash.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(bool_hash) ⇒ Compound
constructor
A new instance of Compound.
Methods included from Encode
Constructor Details
#initialize(bool_hash) ⇒ Compound
Returns a new instance of Compound.
8 9 10 |
# File 'lib/rawscsi/stringifier/compound.rb', line 8 def initialize(bool_hash) @bool_hash = bool_hash end |
Instance Attribute Details
#bool_hash ⇒ Object (readonly)
Returns the value of attribute bool_hash.
6 7 8 |
# File 'lib/rawscsi/stringifier/compound.rb', line 6 def bool_hash @bool_hash end |
Instance Method Details
#build ⇒ Object
12 13 14 15 16 |
# 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 |