Class: ActiveRecord::ConnectionAdapters::CipherStashPG::OID::Bit::Data
- Inherits:
-
Object
- Object
- ActiveRecord::ConnectionAdapters::CipherStashPG::OID::Bit::Data
- Defined in:
- lib/active_record/connection_adapters/6.1/cipherstash_pg/oid/bit.rb,
lib/active_record/connection_adapters/7.0/cipherstash_pg/oid/bit.rb,
lib/active_record/connection_adapters/7.1/cipherstash_pg/oid/bit.rb
Instance Method Summary collapse
- #binary? ⇒ Boolean
- #hex? ⇒ Boolean
-
#initialize(value) ⇒ Data
constructor
A new instance of Data.
- #to_s ⇒ Object
Constructor Details
#initialize(value) ⇒ Data
Returns a new instance of Data.
30 31 32 |
# File 'lib/active_record/connection_adapters/6.1/cipherstash_pg/oid/bit.rb', line 30 def initialize(value) @value = value end |
Instance Method Details
#binary? ⇒ Boolean
38 39 40 |
# File 'lib/active_record/connection_adapters/6.1/cipherstash_pg/oid/bit.rb', line 38 def binary? /\A[01]*\Z/.match?(value) end |
#hex? ⇒ Boolean
42 43 44 |
# File 'lib/active_record/connection_adapters/6.1/cipherstash_pg/oid/bit.rb', line 42 def hex? /\A[0-9A-F]*\Z/i.match?(value) end |
#to_s ⇒ Object
34 35 36 |
# File 'lib/active_record/connection_adapters/6.1/cipherstash_pg/oid/bit.rb', line 34 def to_s value end |