Class: CLTuple1Type

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) ⇒ CLTuple1Type

Returns a new instance of CLTuple1Type.



37
38
39
40
# File 'lib/types/cl_tuple_type.rb', line 37

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

Instance Method Details

#get_valueObject



47
48
49
# File 'lib/types/cl_tuple_type.rb', line 47

def get_value 
  @value
end

#to_bytesObject



55
56
57
# File 'lib/types/cl_tuple_type.rb', line 55

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

#to_jsonObject



51
52
53
# File 'lib/types/cl_tuple_type.rb', line 51

def to_json 
  to_string
end

#to_stringObject



42
43
44
45
# File 'lib/types/cl_tuple_type.rb', line 42

def to_string
  # TUPLE1_ID
  TAGS.key(18).to_s
end