Sha256: f69356bc199d13d7b16203e3b279ce46a8dab048a8eea674c4a2afe659727666

Contents?: true

Size: 989 Bytes

Versions: 1

Compression:

Stored size: 989 Bytes

Contents

module RDee
  module AdditionalOptions

    def additional_options_for(target)
      options = {}
      options.merge!(chrome_options) if need_chrome_options? target
      options.merge!(firefox_options) if need_firefox_options? target
      options.merge!(ie_options) if need_ie_optons? target
      options.merge!(safari_options) if need_safari_options? target
      options.merge!(ios_options) if need_ios_options? target
      options
    end

    def need_chrome_options?(target)
      not chrome_options.nil? and target.to_s.include? 'chrome'
    end

    def need_firefox_options?(target)
      not firefox_options.nil? and target.to_s.include? 'firefox'
    end

    def need_ie_optons?(target)
      not ie_options.nil? and target.to_s.include? 'ie'
    end

    def need_safari_options?(target)
      not safari_options.nil? and target.to_s.include? 'safari'
    end

    def need_ios_options?(target)
      not ios_options.nil? and target.to_s.include? 'ios'
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
RDee-0.7 lib/rdee/additional_options.rb