Module: Arcade::Support::Object

Defined in:
lib/support/object.rb,
lib/support/conversions.rb

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

File activesupport/lib/active_support/core_ext/object/blank.rb, line 19

Returns:

  • (Boolean)


14
15
16
# File 'lib/support/object.rb', line 14

def blank?
  respond_to?(:empty?) ? !!empty? : !self
end

#from_dbObject



122
123
124
# File 'lib/support/conversions.rb', line 122

def from_db
  self
end

#presenceObject

File activesupport/lib/active_support/core_ext/object/blank.rb, line 46



10
11
12
# File 'lib/support/object.rb', line 10

def presence
   self if present?
end

#present?Boolean

this is the rails method

Returns:

  • (Boolean)


5
6
7
# File 'lib/support/object.rb', line 5

def present?
  !blank?
end

#rid?Boolean

Returns:

  • (Boolean)


134
135
136
# File 'lib/support/conversions.rb', line 134

def rid?
  false
end

#to_dbObject



126
127
128
# File 'lib/support/conversions.rb', line 126

def to_db
  self
end

#to_orObject



130
131
132
# File 'lib/support/conversions.rb', line 130

def to_or
  self
end