class RLMProperty

Public Instance Methods

array?() click to toggle source
# File lib/project/realm/property.rb, line 49
def array?
  type == RLMPropertyTypeArray
end
bool?() click to toggle source
# File lib/project/realm/property.rb, line 9
def bool?
  type == RLMPropertyTypeBool
end
data?() click to toggle source
# File lib/project/realm/property.rb, line 31
def data?
  type == RLMPropertyTypeData
end
date?() click to toggle source
# File lib/project/realm/property.rb, line 39
def date?
  type == RLMPropertyTypeDate
end
double?() click to toggle source
# File lib/project/realm/property.rb, line 17
def double?
  type == RLMPropertyTypeDouble
end
float?() click to toggle source
# File lib/project/realm/property.rb, line 13
def float?
  type == RLMPropertyTypeFloat
end
int?() click to toggle source

Primitives

# File lib/project/realm/property.rb, line 5
def int?
  type == RLMPropertyTypeInt
end
mixed?() click to toggle source
# File lib/project/realm/property.rb, line 35
def mixed?
  type == RLMPropertyTypeAny
end
number?() click to toggle source
# File lib/project/realm/property.rb, line 21
def number?
  int? || float? || double?
end
object?() click to toggle source

Arrays/Linked types

# File lib/project/realm/property.rb, line 45
def object?
  type == RLMPropertyTypeObject
end
string?() click to toggle source

Objects

# File lib/project/realm/property.rb, line 27
def string?
  type == RLMPropertyTypeString
end
type_name() click to toggle source
# File lib/project/realm/property.rb, line 53
def type_name
  if int?
    :int
  elsif bool?
    :bool
  elsif float?
    :float
  elsif double?
    :double
  elsif string?
    :string
  elsif data?
    :data
  elsif mixed?
    :mixed
  elsif date?
    :date
  elsif object?
    :object
  elsif array?
    :array
  else
    nil
  end
end