Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/api-pattern/class_helpers.rb

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/api-pattern/class_helpers.rb', line 39

def blank?
  nil? || self == "" || self == ""
end

#present?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/api-pattern/class_helpers.rb', line 35

def present?
  !blank?
end