Class: CLBoolType
Constant Summary
Constants inherited
from CLType
CLType::TAGS
Class Method Summary
collapse
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) ⇒ CLBoolType
Returns a new instance of CLBoolType.
7
8
9
10
|
# File 'lib/types/cl_bool_type.rb', line 7
def initialize(value = nil)
super(value)
@value = value
end
|
Class Method Details
.get_tag ⇒ Object
24
25
26
|
# File 'lib/types/cl_bool_type.rb', line 24
def self.get_tag
TAGS[:Bool]
end
|
Instance Method Details
#get_tag ⇒ Object
28
29
30
|
# File 'lib/types/cl_bool_type.rb', line 28
def get_tag
TAGS[:Bool]
end
|
#to_bytes ⇒ Object
32
33
34
|
# File 'lib/types/cl_bool_type.rb', line 32
def to_bytes
[0].pack("C*").unpack1("H*")
end
|
#to_json ⇒ Object
20
21
22
|
# File 'lib/types/cl_bool_type.rb', line 20
def to_json
to_string
end
|
#to_string ⇒ Object
12
13
14
|
# File 'lib/types/cl_bool_type.rb', line 12
def to_string
TAGS.key(0).to_s
end
|