Sha256: 7240d870dc4436d84505fd2a89a22ea3df275cfec682ba7a0f888005c2c653ec

Contents?: true

Size: 499 Bytes

Versions: 1

Compression:

Stored size: 499 Bytes

Contents

module SimpleHelpers
  class Config
    DEFAULT_SEPARATOR = " ยท "

    def self.helpers
      @helpers ||= {}
    end

    def self.helpers=(helper_methods)
      @helpers = helper_methods
    end

    def self.options
      @options ||= []
    end

    def self.options=(*args)
      options_list = SimpleHelpers::Support.certified_array!(args)
      @options = options_list.collect{|c| c.to_sym }
    end

    def self.has_option?(option)
      @options.include?(option.to_sym)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
simple_helpers-2.0.0 lib/simple_helpers/config.rb