Sha256: e679b5641b4a9ce86e24733f63ffea170f58730854ff1400419fd7863f10cb48
Contents?: true
Size: 477 Bytes
Versions: 17
Compression:
Stored size: 477 Bytes
Contents
module Axlsx # This module defines a single method for parsing options in class # initializers. module OptionsParser # Parses an options hash by calling any defined method by the same # name of the key postfixed with an '=' # @param [Hash] options Options to parse. def parse_options(options={}) options.each do |key, value| key = :"#{key}=" self.send(key, value) if !value.nil? && self.respond_to?(key) end end end end
Version data entries
17 entries across 17 versions & 6 rubygems