Module: AcceptHashAndYieldSlef

Included in:
EPUB::OCF::Container::Rootfile
Defined in:
lib/epub.rb

Instance Method Summary (collapse)

Instance Method Details

- (AcceptHashAndYieldSlef) initialize(attrs = {}) { ... }

A new instance of AcceptHashAndYieldSlef

Parameters:

  • attrs (Hash) (defaults to: {})

Yields:

  • self



9
10
11
12
13
14
15
# File 'lib/epub.rb', line 9

def initialize(attrs={})
  attrs.each_pair do |attr, value|
    setter = "#{attr}="
    __send__ setter, value if respond_to? setter
  end
  yield self
end