Module: Porous::Component::ClassMethods
- Defined in:
- lib/porous/component/class_methods.rb
Instance Method Summary collapse
Instance Method Details
#inject(clazz, opts = {}) ⇒ Object
6 7 8 9 10 |
# File 'lib/porous/component/class_methods.rb', line 6 def inject(clazz, opts = {}) method_name = opts[:as] || clazz.to_s.downcase @injections ||= {} @injections[method_name] = clazz end |
#injections ⇒ Object
12 13 14 |
# File 'lib/porous/component/class_methods.rb', line 12 def injections @injections || {} end |