Module: Bodega::Optional

Included in:
PaymentMethod::Base, ShippingMethod::Base
Defined in:
lib/bodega/optional.rb

Instance Method Summary collapse

Instance Method Details

#options(*new_options) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/bodega/optional.rb', line 3

def options(*new_options)
  option_namespace = self.name.split('::').pop.underscore
  Bodega.class_eval do
    option option_namespace do
      options(*new_options.flatten)
    end
  end
end