Class: RFunk::Some
- Inherits:
-
Object
show all
- Defined in:
- lib/rfunk/some.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(value) ⇒ Some
5
6
7
|
# File 'lib/rfunk/some.rb', line 5
def initialize(value)
@value = value
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *arguments, &block) ⇒ Object
13
14
15
|
# File 'lib/rfunk/some.rb', line 13
def method_missing(method, *arguments, &block)
Option(value.__send__(method, *arguments, &block))
end
|
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
3
4
5
|
# File 'lib/rfunk/some.rb', line 3
def value
@value
end
|
Instance Method Details
#==(other) ⇒ Object
17
18
19
|
# File 'lib/rfunk/some.rb', line 17
def ==(other)
other.value == value
end
|
#or(_) ⇒ Object
9
10
11
|
# File 'lib/rfunk/some.rb', line 9
def or(_)
self
end
|