Class: SimpleHelpers::Config
- Inherits:
-
Object
- Object
- SimpleHelpers::Config
- Defined in:
- lib/simple_helpers/config.rb
Constant Summary collapse
- DEFAULT_SEPARATOR =
" - "
Class Method Summary collapse
- .has_option?(option) ⇒ Boolean
- .helpers ⇒ Object
- .helpers=(helper_methods) ⇒ Object
- .options ⇒ Object
- .options=(*args) ⇒ Object
Class Method Details
.has_option?(option) ⇒ Boolean
22 23 24 |
# File 'lib/simple_helpers/config.rb', line 22 def self.has_option?(option) @options.include?(option.to_sym) end |
.helpers ⇒ Object
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 |
.options ⇒ Object
13 14 15 |
# File 'lib/simple_helpers/config.rb', line 13 def self. @options ||= [] end |
.options=(*args) ⇒ Object
17 18 19 20 |
# File 'lib/simple_helpers/config.rb', line 17 def self.(*args) = SimpleHelpers::Support.certified_array!(args) @options = .collect{|c| c.to_sym } end |