module KerbalDyn::Mixin::OptionsProcessor
Private Instance Methods
process_options(options, defaults={})
click to toggle source
Iterates over all the key/value pairs in the options, calling the relevant accessor. Uses the passed block to get defaults for given keys.
# File lib/kerbaldyn/mixin/options_processor.rb, line 9 def process_options(options, defaults={}) defaults.merge(options).each do |key,value| self.send("#{key}=", value) end end