Class: Chartio::Schema
- Inherits:
-
Object
- Object
- Chartio::Schema
- Defined in:
- lib/chartio/schema.rb
Instance Attribute Summary collapse
-
#formatter ⇒ Object
Returns the value of attribute formatter.
-
#logger ⇒ Object
Returns the value of attribute logger.
Instance Method Summary collapse
-
#initialize(formatter, logger = STDOUT) ⇒ Schema
constructor
A new instance of Schema.
- #output_report ⇒ Object
Constructor Details
#initialize(formatter, logger = STDOUT) ⇒ Schema
Returns a new instance of Schema.
9 10 11 12 |
# File 'lib/chartio/schema.rb', line 9 def initialize(formatter, logger = STDOUT) @formatter = formatter @logger = logger end |
Instance Attribute Details
#formatter ⇒ Object
Returns the value of attribute formatter.
7 8 9 |
# File 'lib/chartio/schema.rb', line 7 def formatter @formatter end |
#logger ⇒ Object
Returns the value of attribute logger.
7 8 9 |
# File 'lib/chartio/schema.rb', line 7 def logger @logger end |
Instance Method Details
#output_report ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/chartio/schema.rb', line 14 def output_report find_relationships do |record| begin @formatter << record rescue => e logger.puts "Encountered an error" logger.puts e. logger.puts e.backtrace end end @formatter.output_report end |