Module: EnsureIt::Config
- Defined in:
- lib/ensure_it/config.rb
Constant Summary collapse
- ERRORS =
i(smart standard)
Class Method Summary collapse
Class Method Details
.errors(value = nil) ⇒ Object
5 6 7 |
# File 'lib/ensure_it/config.rb', line 5 def self.errors(value = nil) value.nil? ? @errors ||= ERRORS.first : self.errors = value end |
.errors=(value) ⇒ Object
9 10 11 12 |
# File 'lib/ensure_it/config.rb', line 9 def self.errors=(value) value = value.to_sym if value.is_a?(String) @errors = ERRORS.include?(value) ? value : ERRORS.first end |