Class: Scrivito::AttributeDefinition
- Inherits:
-
Object
- Object
- Scrivito::AttributeDefinition
- Defined in:
- lib/scrivito/attribute_definition.rb
Overview
This class represents an attribute definition.
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
The name of the attribute.
Instance Method Summary collapse
-
#values ⇒ Array<String>
Allowed values for an attribute.
Instance Attribute Details
#name ⇒ String (readonly)
Returns the name of the attribute.
18 19 20 |
# File 'lib/scrivito/attribute_definition.rb', line 18 def name @name end |
Instance Method Details
#values ⇒ Array<String>
Allowed values for an attribute.
32 33 34 35 36 37 38 |
# File 'lib/scrivito/attribute_definition.rb', line 32 def values if type == 'enum' || type == 'multienum' @options[:values] || [] else [] end end |