Class: CLKeyType

Inherits:
CLType show all
Defined in:
lib/types/cl_key_type.rb

Constant Summary

Constants inherited from CLType

CLType::TAGS

Instance Method Summary collapse

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

Returns a new instance of CLKeyType.



6
7
8
9
# File 'lib/types/cl_key_type.rb', line 6

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

Instance Method Details

#get_valueObject



15
16
17
# File 'lib/types/cl_key_type.rb', line 15

def get_value 
  @value
end

#to_bytesObject



23
24
25
# File 'lib/types/cl_key_type.rb', line 23

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

#to_jsonObject



19
20
21
# File 'lib/types/cl_key_type.rb', line 19

def to_json 
  to_string
end

#to_stringObject



11
12
13
# File 'lib/types/cl_key_type.rb', line 11

def to_string
  TAGS.key(11).to_s
end