Module: Opensteam::Base::Extension::ActsOpensteam
- Defined in:
- lib/opensteam/base.rb
Overview
Extend ActiveRecord::Base with the opensteam method
Instance Method Summary collapse
-
#opensteam(arg, *opt) ⇒ Object
called in a model to inject product-specific methods into the class: class Product < ActiveRecord::Base opensteam :product end.
Instance Method Details
#opensteam(arg, *opt) ⇒ Object
called in a model to inject product-specific methods into the class:
class Product < ActiveRecord::Base
opensteam :product
end
81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/opensteam/base.rb', line 81 def opensteam(arg, *opt) Opensteam._logger "including #{arg.to_s.humanize} Module in #{self.to_s} Model" if arg == :product @opensteam_type = arg class_eval { include Opensteam::ProductBase } else Opensteam._logger "opensteam-method #{arg.to_s} not suppored, in #{self.to_s}" end end |