Class: Hem::Null
- Inherits:
-
Object
show all
- Defined in:
- lib/hem/null.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
3
4
5
|
# File 'lib/hem/null.rb', line 3
def method_missing(method, *args, &block)
self
end
|
Instance Method Details
#nil? ⇒ Boolean
7
8
9
|
# File 'lib/hem/null.rb', line 7
def nil?
true
end
|
#to_a ⇒ Object
11
12
13
|
# File 'lib/hem/null.rb', line 11
def to_a
[]
end
|
#to_f ⇒ Object
19
20
21
|
# File 'lib/hem/null.rb', line 19
def to_f
0.0
end
|
#to_i ⇒ Object
23
24
25
|
# File 'lib/hem/null.rb', line 23
def to_i
0
end
|
#to_s ⇒ Object
15
16
17
|
# File 'lib/hem/null.rb', line 15
def to_s
""
end
|