Class: Errgonomic::Option::None
- Defined in:
- lib/errgonomic/option.rb,
lib/errgonomic/rails/active_record_optional.rb
Overview
A None answers nil? like nil itself, so ActiveRecord internals that check for nil treat an absent value as absent.
Constant Summary
Constants inherited from Any
Instance Method Summary collapse
Methods inherited from Any
#<=>, #==, #and, #and_then, #blank?, #deconstruct, #eql?, #expect!, #filter, #flatten, #hash, #map, #map_or, #map_or_else, #method_missing, #none_or, #ok, #ok_or, #ok_or_else, #or, #or_else, #present?, #pretty_print, #respond_to_missing?, #some_and, #tap_some, #to_a, #to_json, #to_s, #unwrap!, #unwrap_or, #unwrap_or_else, #xor, #zip, #zip_with
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Errgonomic::Option::Any
Instance Method Details
#nil? ⇒ Boolean
85 86 87 |
# File 'lib/errgonomic/rails/active_record_optional.rb', line 85 def nil? true end |
#none? ⇒ Boolean
545 546 547 |
# File 'lib/errgonomic/option.rb', line 545 def none? true end |
#some? ⇒ Boolean
541 542 543 |
# File 'lib/errgonomic/option.rb', line 541 def some? false end |