Class: FuncDef
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#code_if_not_found ⇒ Object
readonly
Returns the value of attribute code_if_not_found.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#remote ⇒ Object
readonly
Returns the value of attribute remote.
-
#ret ⇒ Object
readonly
Returns the value of attribute ret.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
-
#version_num ⇒ Object
readonly
Returns the value of attribute version_num.
-
#version_str ⇒ Object
readonly
Returns the value of attribute version_str.
Instance Method Summary collapse
-
#initialize(key, val) ⇒ FuncDef
constructor
A new instance of FuncDef.
Constructor Details
#initialize(key, val) ⇒ FuncDef
Returns a new instance of FuncDef.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'ext/oci8/apiwrap.rb', line 26 def initialize(key, val) if key[-3..-1] == '_nb' @name = key[0..-4] @remote = true else @name = key @remote = false end ver = val[:version] ver_major = (ver / 100) ver_minor = (ver / 10) % 10 ver_update = ver % 10 @version = ((ver_major << 24) | (ver_minor << 20) | (ver_update << 12)) case @version when 0x08000000; @version_num = 'ORAVER_8_0' when 0x08100000; @version_num = 'ORAVER_8_1' when 0x09000000; @version_num = 'ORAVER_9_0' when 0x09200000; @version_num = 'ORAVER_9_2' when 0x0a100000; @version_num = 'ORAVER_10_1' when 0x0a200000; @version_num = 'ORAVER_10_2' when 0x0b100000; @version_num = 'ORAVER_11_1' end @version_str = "#{ver_major}.#{ver_minor}.#{ver_update}" @ret = val[:ret] || 'sword' @args = val[:args].collect do |arg| ArgDef.new(arg) end @code_if_not_found = val[:code_if_not_found] end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
22 23 24 |
# File 'ext/oci8/apiwrap.rb', line 22 def args @args end |
#code_if_not_found ⇒ Object (readonly)
Returns the value of attribute code_if_not_found.
24 25 26 |
# File 'ext/oci8/apiwrap.rb', line 24 def code_if_not_found @code_if_not_found end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
17 18 19 |
# File 'ext/oci8/apiwrap.rb', line 17 def name @name end |
#remote ⇒ Object (readonly)
Returns the value of attribute remote.
21 22 23 |
# File 'ext/oci8/apiwrap.rb', line 21 def remote @remote end |
#ret ⇒ Object (readonly)
Returns the value of attribute ret.
23 24 25 |
# File 'ext/oci8/apiwrap.rb', line 23 def ret @ret end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
18 19 20 |
# File 'ext/oci8/apiwrap.rb', line 18 def version @version end |
#version_num ⇒ Object (readonly)
Returns the value of attribute version_num.
19 20 21 |
# File 'ext/oci8/apiwrap.rb', line 19 def version_num @version_num end |
#version_str ⇒ Object (readonly)
Returns the value of attribute version_str.
20 21 22 |
# File 'ext/oci8/apiwrap.rb', line 20 def version_str @version_str end |