class Object

Constants

BlackHole

Public Instance Methods

klass() click to toggle source
# File lib/active_type/virtual_attributes_decorator.rb, line 12
def klass
  case type
  when :integer                     then Fixnum
  when :float                       then Float
  when :decimal                     then BigDecimal
  when :datetime, :timestamp, :time then Time
  when :date                        then Date
  when :text, :string, :binary      then String
  when :boolean                     then Object
  end
end
to_b() click to toggle source
# File lib/rails_admin_cms/core_ext/boolean.rb, line 2
def to_b
  return true if self == true || self =~ (/^(true|t|yes|y|1)$/i)
  return false if self == false || self.blank? || self =~ (/^(false|f|no|n|0)$/i)
  raise ArgumentError.new("invalid value for Boolean: \"#{self}\"")
end
to_i() click to toggle source
# File lib/rails_admin_cms/core_ext/boolean.rb, line 18
def to_i; 1; end
type() click to toggle source
# File lib/active_type/virtual_attributes_decorator.rb, line 8
def type
  @type_caster.type
end
type_for_attribute(attribute) click to toggle source
# File lib/active_type/virtual_attributes_decorator.rb, line 2
def type_for_attribute(attribute)
  virtual_columns_hash[attribute]
end