Class: Orthoses::Writer
- Inherits:
-
Object
- Object
- Orthoses::Writer
- Includes:
- Outputable
- Defined in:
- lib/orthoses/writer.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(loader, io:) ⇒ Writer
constructor
A new instance of Writer.
Constructor Details
#initialize(loader, io:) ⇒ Writer
Returns a new instance of Writer.
5 6 7 8 |
# File 'lib/orthoses/writer.rb', line 5 def initialize(loader, io:) @loader = loader @io = io end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/orthoses/writer.rb', line 10 def call @loader.call.tap do |store| store.each do |name, content| @io.write content.to_rbs end end end |