Module: Nanny::AttrInitializer
- Included in:
- Torrent
- Defined in:
- lib/nanny/attr_initializer.rb
Instance Method Summary collapse
Instance Method Details
#initialize(opts = {}) ⇒ Object
6 7 8 9 10 |
# File 'lib/nanny/attr_initializer.rb', line 6 def initialize(opts = {}) opts.each do |opt, val| instance_variable_set("@#{opt}", val) if respond_to? opt end end |