Class: ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Bit::Data
Relationships & Source Files | |
Inherits: | Object |
Defined in: | activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb |
Class Method Summary
- .new(value) ⇒ Data constructor
Instance Attribute Summary
- #binary? ⇒ Boolean readonly
- #hex? ⇒ Boolean readonly
Instance Method Summary
Constructor Details
.new(value) ⇒ Data
# File 'activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb', line 28
def initialize(value) @value = value end
Instance Attribute Details
#binary? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb', line 36
def binary? /\A[01]*\Z/ === value end
#hex? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb', line 40
def hex? /\A[0-9A-F]*\Z/i === value end
Instance Method Details
#to_s
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb', line 32
def to_s value end