Class: Uorm::Attributes::Type::Boolean

Inherits:
Object
  • Object
show all
Defined in:
lib/uorm/attributes/type.rb

Class Method Summary collapse

Class Method Details

.as_json(value) ⇒ Object



23
24
25
# File 'lib/uorm/attributes/type.rb', line 23

def as_json value
  convert value
end

.convert(value) ⇒ Object



19
20
21
# File 'lib/uorm/attributes/type.rb', line 19

def convert value
  value ? true : false
end