Class: CommandTower::Deserializers::Clients::Types::BooleanType

Inherits:
Type
  • Object
show all
Includes:
Singleton
Defined in:
app/deserializers/command_tower/deserializers/clients/types.rb

Instance Method Summary collapse

Instance Method Details

#call(value, path:) ⇒ Object



123
124
125
126
127
# File 'app/deserializers/command_tower/deserializers/clients/types.rb', line 123

def call(value, path:)
  return value if value == true || value == false

  reject!(path, value, "boolean", "expected true or false")
end

#expected_label ⇒ Object



129
130
131
# File 'app/deserializers/command_tower/deserializers/clients/types.rb', line 129

def expected_label
  "boolean"
end