| Module | Opensteam::Base::Extension::ActsOpensteam |
| In: |
lib/opensteam/base.rb
|
called in a model to inject product-specific methods into the class:
class Product < ActiveRecord::Base
opensteam :product
end
# File lib/opensteam/base.rb, line 97
97: def opensteam(arg, *opt)
98: Opensteam._logger "including #{arg.to_s.humanize} Module in #{self.to_s} Model"
99:
100: if arg == :product
101: @opensteam_type = arg
102: class_eval { include Opensteam::ProductBase }
103: else
104: Opensteam._logger "opensteam-method #{arg.to_s} not suppored, in #{self.to_s}"
105: end
106:
107: end