Class: Ykutils::RetCode

Inherits:
Object
  • Object
show all
Defined in:
lib/ykutils/retcodex.rb

Direct Known Subclasses

RetCode2

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#boolObject

Returns the value of attribute bool.



4
5
6
# File 'lib/ykutils/retcodex.rb', line 4

def bool
  @bool
end

#mesObject

Returns the value of attribute mes.



4
5
6
# File 'lib/ykutils/retcodex.rb', line 4

def mes
  @mes
end

#retObject

Returns the value of attribute ret.



4
5
6
# File 'lib/ykutils/retcodex.rb', line 4

def ret
  @ret
end

#valObject (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_sObject



17
18
19
# File 'lib/ykutils/retcodex.rb', line 17

def to_s
  @bool
end