Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/joffice/kernel/object.rb
Instance Method Summary collapse
Instance Method Details
#nil_or_empty(if_nil, &block) ⇒ Object
20 21 22 23 24 |
# File 'lib/joffice/kernel/object.rb', line 20 def nil_or_empty(if_nil, &block) return if_nil if nil? or empty? return block.call(self) if block self end |
#nil_or_empty? ⇒ Boolean
26 27 28 |
# File 'lib/joffice/kernel/object.rb', line 26 def nil_or_empty? nil? or empty? end |