Class: SmartConfig::Formatters::Boolean

Inherits:
Object
  • Object
show all
Defined in:
lib/smart_config/formatters/boolean.rb

Overview

Boolean formats the value into a boolean

Class Method Summary collapse

Class Method Details

.format(value) ⇒ Object

rubocop:disable Naming/PredicateMethod – This is not a predicate method



8
9
10
# File 'lib/smart_config/formatters/boolean.rb', line 8

def self.format(value) # rubocop:disable Naming/PredicateMethod -- This is not a predicate method
  ['true', '1', 1, true].include?(value)
end