Module: Boundy::Formatter::Sql::Plugin
- Extended by:
- Punchout::Punchable
- Included in:
- Boundy::Formatters::Fixnum, Boundy::Formatters::Sql::Bound, Boundy::Formatters::Sql::Domain, Boundy::Formatters::Time
- Defined in:
- lib/boundy/formatter/sql/plugin.rb
Defined Under Namespace
Modules: FactoryMethods
Class Method Summary collapse
Class Method Details
.for(obj) ⇒ Object
31 32 33 |
# File 'lib/boundy/formatter/sql/plugin.rb', line 31 def for(obj) punch(obj) end |
.included(base) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/boundy/formatter/sql/plugin.rb', line 19 def included(base) # XXX: This should really become an explicit include. unless base.respond_to?(:factory) base.instance_exec do extend FactoryMethods end end Boundy.logger.info "REGISTERING #{base} AS FORMATTER FOR #{base.type}" matchable = Punchout::Matcher::Ancestry.new(base.type).punches(base.factory) puncher.add(matchable) end |