Module: ImgDl::Helper

Included in:
Parser
Defined in:
lib/img_dl/helper.rb

Instance Method Summary collapse

Instance Method Details

#define_options_helper(options) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/img_dl/helper.rb', line 5

def define_options_helper options
  options.each_key do |k|
    self.class.send :define_method,k do
      options[k]
    end

    self.class.send :define_method,"#{k}?" do
      options[k].present?
    end
  end
end