Class: EnumFields::Configuration
- Inherits:
-
Object
- Object
- EnumFields::Configuration
- Defined in:
- lib/enum_fields/configuration.rb
Constant Summary collapse
- DEFAULTS =
{ scopeable: true, validatable: true, nullable: true, inquirable: true, }.freeze
Instance Attribute Summary collapse
-
#inquirable ⇒ Object
Returns the value of attribute inquirable.
-
#nullable ⇒ Object
Returns the value of attribute nullable.
-
#scopeable ⇒ Object
Returns the value of attribute scopeable.
-
#validatable ⇒ Object
Returns the value of attribute validatable.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #reset! ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
14 15 16 |
# File 'lib/enum_fields/configuration.rb', line 14 def initialize reset! end |
Instance Attribute Details
#inquirable ⇒ Object
Returns the value of attribute inquirable.
12 13 14 |
# File 'lib/enum_fields/configuration.rb', line 12 def inquirable @inquirable end |
#nullable ⇒ Object
Returns the value of attribute nullable.
12 13 14 |
# File 'lib/enum_fields/configuration.rb', line 12 def nullable @nullable end |
#scopeable ⇒ Object
Returns the value of attribute scopeable.
12 13 14 |
# File 'lib/enum_fields/configuration.rb', line 12 def scopeable @scopeable end |
#validatable ⇒ Object
Returns the value of attribute validatable.
12 13 14 |
# File 'lib/enum_fields/configuration.rb', line 12 def validatable @validatable end |
Instance Method Details
#reset! ⇒ Object
18 19 20 |
# File 'lib/enum_fields/configuration.rb', line 18 def reset! DEFAULTS.each { |key, value| public_send("#{key}=", value) } end |