Class: Money::ReverseOperationProxy

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/money/money.rb

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ ReverseOperationProxy

Returns a new instance of ReverseOperationProxy.



173
174
175
# File 'lib/money/money.rb', line 173

def initialize(value)
  @value = value
end

Instance Method Details

#*(other) ⇒ Object



189
190
191
# File 'lib/money/money.rb', line 189

def *(other)
  other * @value
end

#+(other) ⇒ Object



181
182
183
# File 'lib/money/money.rb', line 181

def +(other)
  other + @value
end

#-(other) ⇒ Object



185
186
187
# File 'lib/money/money.rb', line 185

def -(other)
  -(other - @value)
end

#<=>(other) ⇒ Object



177
178
179
# File 'lib/money/money.rb', line 177

def <=>(other)
  -(other <=> @value)
end