123456789_123456789_123456789_123456789_123456789_

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

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(value) ⇒ Data

[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb', line 30

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 38

def binary?
  /\A[01]*\Z/.match?(value)
end

#hex?Boolean (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb', line 42

def hex?
  /\A[0-9A-F]*\Z/i.match?(value)
end

#value (readonly, private)

[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb', line 47

attr_reader :value

Instance Method Details

#to_s

[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb', line 34

def to_s
  value
end