Class: Boundy::Formatter::Sql
- Inherits:
-
Object
- Object
- Boundy::Formatter::Sql
- Defined in:
- lib/boundy/formatter/sql.rb,
lib/boundy/formatter/sql/domain.rb,
lib/boundy/formatter/sql/plugin.rb,
lib/boundy/formatter/sql/factory.rb,
lib/boundy/formatter/sql/domain/plugin.rb
Defined Under Namespace
Modules: Plugin Classes: Domain, Factory
Instance Method Summary collapse
-
#initialize(obj, name) ⇒ Sql
constructor
A new instance of Sql.
- #to_s ⇒ Object
Constructor Details
#initialize(obj, name) ⇒ Sql
Returns a new instance of Sql.
11 12 13 14 15 16 17 |
# File 'lib/boundy/formatter/sql.rb', line 11 def initialize(obj, name) formatter_factory = Plugin.for(obj) if formatter_factory.nil? raise "No formatter registered for #{obj.class}: #{obj.inspect}" end @formatter = formatter_factory.build(obj, name) end |
Instance Method Details
#to_s ⇒ Object
19 20 21 |
# File 'lib/boundy/formatter/sql.rb', line 19 def to_s @formatter.to_s end |