Sha256: 099292cf6f71e1643cf9fbad6b4f303255ee8039d6409711248c2cac5c3d97de

Contents?: true

Size: 498 Bytes

Versions: 1

Compression:

Stored size: 498 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.1 lib/simple_helpers/config.rb