Class: Object

Inherits:
BasicObject
Defined in:
lib/unresponsys/helpers.rb

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/unresponsys/helpers.rb', line 10

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

#presenceObject



18
19
20
# File 'lib/unresponsys/helpers.rb', line 18

def presence
  self if present?
end

#present?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/unresponsys/helpers.rb', line 14

def present?
  !blank?
end

#to_responsysObject



2
3
4
# File 'lib/unresponsys/helpers.rb', line 2

def to_responsys
  self.to_s
end

#to_rubyObject



6
7
8
# File 'lib/unresponsys/helpers.rb', line 6

def to_ruby
  self
end