Class: RailsBestPractices::Core::Nil
- Inherits:
-
Object
- Object
- RailsBestPractices::Core::Nil
- Defined in:
- lib/rails_best_practices/core/nil.rb
Overview
Fake nil.
Instance Method Summary collapse
-
#array_size ⇒ Object
array_size is 0.
-
#blank? ⇒ Boolean
true.
-
#hash_size ⇒ Object
hash_size is 0.
-
#method_missing(method_sym, *arguments, &block) ⇒ Object
return self.
-
#present? ⇒ Boolean
false.
-
#to_s ⇒ Object
return self for to_s.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_sym, *arguments, &block) ⇒ Object
return self.
32 33 34 |
# File 'lib/rails_best_practices/core/nil.rb', line 32 def method_missing(method_sym, *arguments, &block) self end |
Instance Method Details
#array_size ⇒ Object
array_size is 0.
12 13 14 |
# File 'lib/rails_best_practices/core/nil.rb', line 12 def array_size 0 end |
#blank? ⇒ Boolean
true
27 28 29 |
# File 'lib/rails_best_practices/core/nil.rb', line 27 def blank? true end |
#hash_size ⇒ Object
hash_size is 0.
7 8 9 |
# File 'lib/rails_best_practices/core/nil.rb', line 7 def hash_size 0 end |
#present? ⇒ Boolean
false
22 23 24 |
# File 'lib/rails_best_practices/core/nil.rb', line 22 def present? false end |
#to_s ⇒ Object
return self for to_s.
17 18 19 |
# File 'lib/rails_best_practices/core/nil.rb', line 17 def to_s self end |