Class: Spree::WebMoneyDecorator

Inherits:
Object
  • Object
show all
Defined in:
app/models/spree/web_money_decorator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source) ⇒ WebMoneyDecorator

Returns a new instance of WebMoneyDecorator.



7
8
9
10
11
12
13
# File 'app/models/spree/web_money_decorator.rb', line 7

def initialize(source)
  @source = if source.present? && source.brand == "web_moneys"
              source
            else
              nil
            end
end

Instance Attribute Details

#sourceObject (readonly)

Returns the value of attribute source.



3
4
5
# File 'app/models/spree/web_money_decorator.rb', line 3

def source
  @source
end