Class: Object
- Inherits:
- BasicObject
- Defined in:
- gems/carbuncle-support/mrblib/presence.rb,
.doc_tmp/mattn/mruby-json/mrblib/json.rb more...
Instance Method Summary collapse
Instance Method Details
#blank? ⇒ Boolean
2 3 4 |
# File 'gems/carbuncle-support/mrblib/presence.rb', line 2 def blank? respond_to?(:empty?) ? !!empty? : !self end |
#presence ⇒ Object
[View source]
10 11 12 |
# File 'gems/carbuncle-support/mrblib/presence.rb', line 10 def presence present? ? self : nil end |
#present? ⇒ Boolean
6 7 8 |
# File 'gems/carbuncle-support/mrblib/presence.rb', line 6 def present? !blank? end |
#to_json ⇒ Object
[View source]
2 3 4 |
# File '.doc_tmp/mattn/mruby-json/mrblib/json.rb', line 2 def to_json() JSON::generate(self) end |