Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/yandex-webmaster/core_ext/object.rb
Instance Method Summary collapse
Instance Method Details
#blank? ⇒ Boolean
4 5 6 |
# File 'lib/yandex-webmaster/core_ext/object.rb', line 4 def blank? !self end |
#present? ⇒ Boolean
8 9 10 |
# File 'lib/yandex-webmaster/core_ext/object.rb', line 8 def present? !blank? end |
#try(*a, &b) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/yandex-webmaster/core_ext/object.rb', line 12 def try(*a, &b) if a.empty? && block_given? yield self else __send__(*a, &b) end end |