Class: Coercer::Boolean

Inherits:
Object
  • Object
show all
Defined in:
lib/attribrutal/coercion.rb

Class Method Summary collapse

Class Method Details

.coerce(arg, default = nil) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/attribrutal/coercion.rb', line 4

def self.coerce(arg, default = nil)
  if arg == true
    true
  else
    false
  end
end