class JsonTableSchema::Types::Boolean
Public Class Methods
supported_constraints()
click to toggle source
# File lib/jsontableschema/types/boolean.rb, line 15 def self.supported_constraints [ 'required', 'pattern', 'enum', ] end
Public Instance Methods
cast_default(value)
click to toggle source
# File lib/jsontableschema/types/boolean.rb, line 27 def cast_default(value) value = convert_to_boolean(value) raise JsonTableSchema::InvalidCast.new("#{value} is not a #{name}") if value.nil? value end
name()
click to toggle source
# File lib/jsontableschema/types/boolean.rb, line 11 def name 'boolean' end
type()
click to toggle source
# File lib/jsontableschema/types/boolean.rb, line 23 def type ::Boolean end