Class: CLStringType
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) ⇒ CLStringType
7
8
9
10
|
# File 'lib/types/cl_string_type.rb', line 7
def initialize(value = nil)
super(value)
@value = value
end
|
Instance Method Details
#get_value ⇒ Object
16
17
18
|
# File 'lib/types/cl_string_type.rb', line 16
def get_value
@value
end
|
#to_bytes ⇒ Object
24
25
26
|
# File 'lib/types/cl_string_type.rb', line 24
def to_bytes
[10].pack("C*").unpack1("H*")
end
|
#to_json ⇒ Object
20
21
22
|
# File 'lib/types/cl_string_type.rb', line 20
def to_json
to_string
end
|
#to_string ⇒ Object
12
13
14
|
# File 'lib/types/cl_string_type.rb', line 12
def to_string
TAGS.key(10).to_s
end
|