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.
164 165 166 |
# File 'lib/money/money.rb', line 164 def initialize(value) @value = value end |
Instance Method Details
#*(other) ⇒ Object
180 181 182 |
# File 'lib/money/money.rb', line 180 def *(other) other * @value end |
#+(other) ⇒ Object
172 173 174 |
# File 'lib/money/money.rb', line 172 def +(other) other + @value end |
#-(other) ⇒ Object
176 177 178 |
# File 'lib/money/money.rb', line 176 def -(other) -(other - @value) end |
#<=>(other) ⇒ Object
168 169 170 |
# File 'lib/money/money.rb', line 168 def <=>(other) -(other <=> @value) end |