Module: Discoverer::Writer
- Included in:
- Model
- Defined in:
- lib/discoverer/writer.rb
Defined Under Namespace
Classes: EmptySourceError, MissingWriterError
Instance Method Summary collapse
Instance Method Details
#to ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/discoverer/writer.rb', line 4 def to begin @_writer ||= Discoverer.for(::Writer, self.class).new self @_writer rescue Discoverer::NotFoundError => e raise MissingWriterError, "The writer for #{self.class} (Writer::#{self.class}) wasn't found, please create it" end end |