Sha256: f944dbed69c6eb09235991c7b80e86de43d7acc7a774c3ad030903565be5bb9b

Contents?: true

Size: 330 Bytes

Versions: 4

Compression:

Stored size: 330 Bytes

Contents

require 'active_support/core_ext'

module ImgDl
  module Helper
    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
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
img_dl-0.0.4 lib/img_dl/helper.rb
img_dl-0.0.3 lib/img_dl/helper.rb
img_dl-0.0.2 lib/img_dl/helper.rb
img_dl-0.0.1 lib/img_dl/helper.rb