Class: CLOption
- Includes:
- CLValueBytesParsers::CLOptionBytesParser
- Defined in:
- lib/types/cl_option.rb
Overview
Instance Method Summary collapse
- #get_cl_type ⇒ Object
- #get_inner_type ⇒ Object
- #get_value ⇒ Object
-
#initialize(data = nil, inner_type = nil) ⇒ CLOption
constructor
A new instance of CLOption.
Methods included from CLValueBytesParsers::CLOptionBytesParser
Methods inherited from CLValue
Constructor Details
#initialize(data = nil, inner_type = nil) ⇒ CLOption
Returns a new instance of CLOption.
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/types/cl_option.rb', line 12 def initialize(data = nil, inner_type = nil) super @data = data @inner_type = inner_type if data == nil && inner_type == nil raise ArgumentError.new("You had to assign innerType for None") elsif data == nil && inner_type != nil @inner_type = inner_type else # @inner_type = data[:cl_type] @inner_type = data.get_cl_type end end |
Instance Method Details
#get_cl_type ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/types/cl_option.rb', line 30 def get_cl_type CLOptionType.new(@inner_type).get_type =begin @inner_type get_type =end end |
#get_inner_type ⇒ Object
38 39 40 |
# File 'lib/types/cl_option.rb', line 38 def get_inner_type @inner_type end |
#get_value ⇒ Object
26 27 28 |
# File 'lib/types/cl_option.rb', line 26 def get_value @data end |