Class: FactoryForm::Boolean
Instance Attribute Summary collapse
-
#values ⇒ Object
True/false values.
Attributes inherited from Field
#field_type, #hint, #id, #label, #required, #unique, #validation_format
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Boolean
constructor
A new instance of Boolean.
Constructor Details
#initialize(options = {}) ⇒ Boolean
Returns a new instance of Boolean.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/factoryform/boolean.rb', line 5 def initialize(={}) self.values = [:values] = [true, false] [:field_type] = "boolean" super() # Unique is always false self.unique = false end |
Instance Attribute Details
#values ⇒ Object
True/false values
3 4 5 |
# File 'lib/factoryform/boolean.rb', line 3 def values @values end |