Class: CLBoolType
Constant Summary
Constants inherited from CLType
Class Method Summary collapse
Instance Method Summary collapse
- #get_tag ⇒ Object
-
#initialize(value = nil) ⇒ CLBoolType
constructor
A new instance of CLBoolType.
- #to_bytes ⇒ Object
-
#to_json ⇒ Object
def get_value @value end.
- #to_string ⇒ Object
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
def get_value
@value
end
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 |