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.



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

#boolObject (readonly)

Returns the value of attribute bool.



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

def bool
  @bool
end

#mesObject (readonly)

Returns the value of attribute mes.



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

def mes
  @mes
end

#retObject (readonly)

Returns the value of attribute ret.



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

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



12
13
14
# File 'lib/ykutils/retcodex.rb', line 12

def [](key)
  @val[key]
end

#get_boolObject



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_sObject



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

def to_s
  @bool
end