Class: SimpleHelpers::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_helpers/config.rb

Constant Summary collapse

DEFAULT_SEPARATOR =
" - "

Class Method Summary collapse

Class Method Details

.has_option?(option) ⇒ Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/simple_helpers/config.rb', line 22

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

.helpersObject



5
6
7
# File 'lib/simple_helpers/config.rb', line 5

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

.helpers=(helper_methods) ⇒ Object



9
10
11
# File 'lib/simple_helpers/config.rb', line 9

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

.optionsObject



13
14
15
# File 'lib/simple_helpers/config.rb', line 13

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

.options=(*args) ⇒ Object



17
18
19
20
# File 'lib/simple_helpers/config.rb', line 17

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