Class: Ykutils::RetCode
- Inherits:
-
Object
- Object
- Ykutils::RetCode
- Defined in:
- lib/ykutils/retcodex.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#bool ⇒ Object
readonly
Returns the value of attribute bool.
-
#mes ⇒ Object
readonly
Returns the value of attribute mes.
-
#ret ⇒ Object
readonly
Returns the value of attribute ret.
-
#val ⇒ Object
readonly
Returns the value of attribute val.
Instance Method Summary collapse
- #[](key) ⇒ Object
- #get_bool ⇒ Object
-
#initialize(obj) ⇒ RetCode
constructor
A new instance of RetCode.
- #set_bool(val) ⇒ Object
- #set_mes(val) ⇒ Object
- #set_ret(val) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(obj) ⇒ RetCode
Returns a new instance of RetCode.
5 6 7 8 9 10 |
# File 'lib/ykutils/retcodex.rb', line 5 def initialize(obj) @val = obj @mes = obj["mes"] @ret = obj["ret"] @bool = obj["bool"] end |
Instance Attribute Details
#bool ⇒ Object (readonly)
Returns the value of attribute bool.
3 4 5 |
# File 'lib/ykutils/retcodex.rb', line 3 def bool @bool end |
#mes ⇒ Object (readonly)
Returns the value of attribute mes.
3 4 5 |
# File 'lib/ykutils/retcodex.rb', line 3 def mes @mes end |
#ret ⇒ Object (readonly)
Returns the value of attribute ret.
3 4 5 |
# File 'lib/ykutils/retcodex.rb', line 3 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
12 13 14 |
# File 'lib/ykutils/retcodex.rb', line 12 def [](key) @val[key] end |
#get_bool ⇒ Object
24 25 26 |
# File 'lib/ykutils/retcodex.rb', line 24 def get_bool @bool end |
#set_bool(val) ⇒ Object
20 21 22 |
# File 'lib/ykutils/retcodex.rb', line 20 def set_bool(val) @bool = val end |
#set_mes(val) ⇒ Object
28 29 30 |
# File 'lib/ykutils/retcodex.rb', line 28 def set_mes(val) @mes = val end |
#set_ret(val) ⇒ Object
32 33 34 |
# File 'lib/ykutils/retcodex.rb', line 32 def set_ret(val) @ret = val end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/ykutils/retcodex.rb', line 16 def to_s @bool end |