Class: Mediumize::StdoutPublisher
- Inherits:
-
Object
- Object
- Mediumize::StdoutPublisher
- Defined in:
- lib/mediumize/stdout_publisher.rb
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ StdoutPublisher
constructor
A new instance of StdoutPublisher.
- #publish(file) ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ StdoutPublisher
Returns a new instance of StdoutPublisher.
3 4 5 |
# File 'lib/mediumize/stdout_publisher.rb', line 3 def initialize(opts={}) @renderer = Mediumize::Renderer.new(opts) end |
Instance Method Details
#publish(file) ⇒ Object
7 8 9 10 11 |
# File 'lib/mediumize/stdout_publisher.rb', line 7 def publish(file) content = @renderer.render(File.read(file), file) puts content[:content] { :id => "id/dry-run", :url => "http://example.com/dry-run", :content => content } end |