Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/bright/helpers/blank_helper.rb,
lib/bright/helpers/boolean_parser_helper.rb
Instance Method Summary collapse
Instance Method Details
#blank? ⇒ Boolean
2 3 4 |
# File 'lib/bright/helpers/blank_helper.rb', line 2 def blank? respond_to?(:empty?) ? !!empty? : !self end |
#presence ⇒ Object
10 11 12 |
# File 'lib/bright/helpers/blank_helper.rb', line 10 def presence self if present? end |
#present? ⇒ Boolean
6 7 8 |
# File 'lib/bright/helpers/blank_helper.rb', line 6 def present? !blank? end |
#to_bool ⇒ Object
10 11 12 |
# File 'lib/bright/helpers/boolean_parser_helper.rb', line 10 def to_bool Boolean(self) end |