Class: Ykutils::RetCode
- Inherits:
-
Object
- Object
- Ykutils::RetCode
- Defined in:
- lib/ykutils/retcodex.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#bool ⇒ Object
Returns the value of attribute bool.
-
#mes ⇒ Object
Returns the value of attribute mes.
-
#ret ⇒ Object
Returns the value of attribute ret.
-
#val ⇒ Object
readonly
Returns the value of attribute val.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(obj) ⇒ RetCode
constructor
A new instance of RetCode.
- #to_s ⇒ Object
Constructor Details
#initialize(obj) ⇒ RetCode
Returns a new instance of RetCode.
6 7 8 9 10 11 |
# File 'lib/ykutils/retcodex.rb', line 6 def initialize(obj) @val = obj @mes = obj["mes"] @ret = obj["ret"] @bool = obj["bool"] end |
Instance Attribute Details
#bool ⇒ Object
Returns the value of attribute bool.
4 5 6 |
# File 'lib/ykutils/retcodex.rb', line 4 def bool @bool end |
#mes ⇒ Object
Returns the value of attribute mes.
4 5 6 |
# File 'lib/ykutils/retcodex.rb', line 4 def mes @mes end |
#ret ⇒ Object
Returns the value of attribute ret.
4 5 6 |
# File 'lib/ykutils/retcodex.rb', line 4 def ret @ret end |
#val ⇒ Object (readonly)
Returns the value of attribute val.
3 4 5 |
# File 'lib/ykutils/retcodex.rb', line 3 def val @val end |
Instance Method Details
#[](key) ⇒ Object
13 14 15 |
# File 'lib/ykutils/retcodex.rb', line 13 def [](key) @val[key] end |
#to_s ⇒ Object
17 18 19 |
# File 'lib/ykutils/retcodex.rb', line 17 def to_s @bool end |