1 |
module Attributor |
4✔ |
2 |
class Symbol |
4✔ |
3 |
include Type
|
4✔ |
4 |
|
|
5 |
def self.native_type |
4✔ |
6 |
::Symbol
|
16✔ |
7 |
end
|
|
8 |
|
|
9 |
def self.load(value, context = Attributor::DEFAULT_ROOT_CONTEXT, **options) |
4✔ |
10 |
value.to_sym |
17,322✔ |
11 |
rescue
|
|
12 |
super
|
68✔ |
13 |
end
|
|
14 |
|
|
15 |
def self.example(_context = nil, options: {}) |
4✔ |
16 |
:example
|
× |
17 |
end
|
|
18 |
|
|
19 |
def self.family |
4✔ |
20 |
String.family
|
160✔ |
21 |
end
|
|
22 |
|
|
|
def self.json_schema_type |
4✔ |
|
:string
|
× |
25 |
end
|
|
26 |
|
|
27 |
end
|
|
28 |
end
|