Class: VagrantCloud::Data::NilClass
- Inherits:
- BasicObject
- Includes:
- Singleton
- Defined in:
- lib/vagrant_cloud/data.rb
Overview
Custom nil class which is used for signifying a nil value that was not set by the user. This makes it easy to filter out values which are unset vs. those that are set to nil.
Instance Method Summary collapse
- #! ⇒ Object
- #&(_) ⇒ Object
- #==(v) ⇒ Object
- #===(v) ⇒ Object
- #^(_) ⇒ Object
- #equal?(v) ⇒ Boolean
- #inspect ⇒ Object
- #nil? ⇒ Boolean
- #to_a ⇒ Object
- #to_f ⇒ Object
- #to_h ⇒ Object
- #to_i ⇒ Object
- #to_s ⇒ Object
- #|(_) ⇒ Object
Instance Method Details
#! ⇒ Object
23 |
# File 'lib/vagrant_cloud/data.rb', line 23 def !; true; end |
#&(_) ⇒ Object
20 |
# File 'lib/vagrant_cloud/data.rb', line 20 def &(_); false; end |
#==(v) ⇒ Object
12 |
# File 'lib/vagrant_cloud/data.rb', line 12 def ==(v); v.nil? || super(v); end |
#===(v) ⇒ Object
13 |
# File 'lib/vagrant_cloud/data.rb', line 13 def ===(v); equal?(v); end |
#^(_) ⇒ Object
22 |
# File 'lib/vagrant_cloud/data.rb', line 22 def ^(_); false; end |
#equal?(v) ⇒ Boolean
14 |
# File 'lib/vagrant_cloud/data.rb', line 14 def equal?(v); v.nil? || super(v); end |
#inspect ⇒ Object
24 |
# File 'lib/vagrant_cloud/data.rb', line 24 def inspect; 'nil'; end |
#nil? ⇒ Boolean
11 |
# File 'lib/vagrant_cloud/data.rb', line 11 def nil?; true; end |
#to_a ⇒ Object
17 |
# File 'lib/vagrant_cloud/data.rb', line 17 def to_a; []; end |
#to_f ⇒ Object
16 |
# File 'lib/vagrant_cloud/data.rb', line 16 def to_f; 0.0; end |
#to_h ⇒ Object
18 |
# File 'lib/vagrant_cloud/data.rb', line 18 def to_h; {}; end |
#to_i ⇒ Object
15 |
# File 'lib/vagrant_cloud/data.rb', line 15 def to_i; 0; end |
#to_s ⇒ Object
19 |
# File 'lib/vagrant_cloud/data.rb', line 19 def to_s; ""; end |
#|(_) ⇒ Object
21 |
# File 'lib/vagrant_cloud/data.rb', line 21 def |(_); false; end |