class Etherlite::Types::Boolean
Constants
- FALSE
- TRUE
Public Instance Methods
decode(_connection, _value)
click to toggle source
# File lib/etherlite/types/boolean.rb, line 22 def decode(_connection, _value) _value.hex > 0 end
encode(_value)
click to toggle source
# File lib/etherlite/types/boolean.rb, line 14 def encode(_value) unless _value.is_a?(TrueClass) || _value.is_a?(FalseClass) raise ArgumentError, "value must be a boolean for #{signature}" end _value ? TRUE : FALSE end
signature()
click to toggle source
# File lib/etherlite/types/boolean.rb, line 6 def signature "bool" end
size()
click to toggle source
# File lib/etherlite/types/boolean.rb, line 10 def size 32 end