Class: Money::ReverseOperationProxy
- Inherits:
-
Object
- Object
- Money::ReverseOperationProxy
- Includes:
- Comparable
- Defined in:
- lib/money/money.rb
Instance Method Summary collapse
- #*(other) ⇒ Object
- #+(other) ⇒ Object
- #-(other) ⇒ Object
- #<=>(other) ⇒ Object
-
#initialize(value) ⇒ ReverseOperationProxy
constructor
A new instance of ReverseOperationProxy.
Constructor Details
#initialize(value) ⇒ ReverseOperationProxy
Returns a new instance of ReverseOperationProxy.
165 166 167 |
# File 'lib/money/money.rb', line 165 def initialize(value) @value = value end |
Instance Method Details
#*(other) ⇒ Object
181 182 183 |
# File 'lib/money/money.rb', line 181 def *(other) other * @value end |
#+(other) ⇒ Object
173 174 175 |
# File 'lib/money/money.rb', line 173 def +(other) other + @value end |
#-(other) ⇒ Object
177 178 179 |
# File 'lib/money/money.rb', line 177 def -(other) -(other - @value) end |
#<=>(other) ⇒ Object
169 170 171 |
# File 'lib/money/money.rb', line 169 def <=>(other) -(other <=> @value) end |