Class: Attributor::Symbol
- Inherits:
-
Object
- Object
- Attributor::Symbol
- Includes:
- Type
- Defined in:
- lib/attributor/types/symbol.rb
Class Method Summary collapse
- .example(context = nil, options: {}) ⇒ Object
- .family ⇒ Object
- .load(value, context = Attributor::DEFAULT_ROOT_CONTEXT, **options) ⇒ Object
- .native_type ⇒ Object
Methods included from Type
Class Method Details
.example(context = nil, options: {}) ⇒ Object
16 17 18 |
# File 'lib/attributor/types/symbol.rb', line 16 def self.example(context=nil, options:{}) :example end |
.family ⇒ Object
20 21 22 |
# File 'lib/attributor/types/symbol.rb', line 20 def self.family String.family end |
.load(value, context = Attributor::DEFAULT_ROOT_CONTEXT, **options) ⇒ Object
10 11 12 13 14 |
# File 'lib/attributor/types/symbol.rb', line 10 def self.load(value,context=Attributor::DEFAULT_ROOT_CONTEXT, **) value.to_sym rescue super end |
.native_type ⇒ Object
5 6 7 |
# File 'lib/attributor/types/symbol.rb', line 5 def self.native_type return ::Symbol end |