Class: Feedx::Format::Abstract::Wrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/feedx/format/abstract.rb

Direct Known Subclasses

Decoder, Encoder

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(io) ⇒ Wrapper

Returns a new instance of Wrapper.



18
19
20
# File 'lib/feedx/format/abstract.rb', line 18

def initialize(io, **)
  @io = io
end

Class Method Details

.open(io, **opts) ⇒ Object



11
12
13
14
15
16
# File 'lib/feedx/format/abstract.rb', line 11

def self.open(io, **opts)
  inst = new(io, **opts)
  yield inst
ensure
  inst&.close
end