Class: CLTuple2Type

Inherits:
CLTupleType show all
Defined in:
lib/types/cl_tuple_type.rb

Constant Summary

Constants inherited from CLType

CLType::TAGS

Instance Method Summary collapse

Methods inherited from CLTupleType

#get_data

Methods inherited from CLType

#get_cl_type_tag, #get_link_to, #get_tag_key, #get_tag_value, #get_tags, #tag_value_isvalid

Constructor Details

#initialize(value = nil) ⇒ CLTuple2Type

Returns a new instance of CLTuple2Type.



61
62
63
64
# File 'lib/types/cl_tuple_type.rb', line 61

def initialize(value = nil)  
  super(value)
  @value = value
end

Instance Method Details

#get_valueObject



71
72
73
# File 'lib/types/cl_tuple_type.rb', line 71

def get_value 
  @value
end

#to_bytesObject



79
80
81
# File 'lib/types/cl_tuple_type.rb', line 79

def to_bytes
  [19].pack("C*").unpack1("H*")
end

#to_jsonObject



75
76
77
# File 'lib/types/cl_tuple_type.rb', line 75

def to_json 
  to_string
end

#to_stringObject



66
67
68
69
# File 'lib/types/cl_tuple_type.rb', line 66

def to_string
  # TUPLE2_ID
  TAGS.key(19).to_s
end