Class: Rawscsi::Stringifier::Simple
- Inherits:
-
Object
- Object
- Rawscsi::Stringifier::Simple
- Includes:
- Encode
- Defined in:
- lib/rawscsi/stringifier/simple.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(value) ⇒ Simple
constructor
A new instance of Simple.
Methods included from Encode
Constructor Details
#initialize(value) ⇒ Simple
Returns a new instance of Simple.
8 9 10 |
# File 'lib/rawscsi/stringifier/simple.rb', line 8 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
6 7 8 |
# File 'lib/rawscsi/stringifier/simple.rb', line 6 def value @value end |
Instance Method Details
#build ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/rawscsi/stringifier/simple.rb', line 12 def build if value.kind_of?(Hash) build_from_hash(value) else encode(stringify(value)) end end |