Class: Scrivito::AttributeDefinition

Inherits:
Object
  • Object
show all
Defined in:
app/cms/scrivito/attribute_definition.rb

Overview

This class represents an attribute definition.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameString (readonly)

Returns the name of the attribute.



18
19
20
# File 'app/cms/scrivito/attribute_definition.rb', line 18

def name
  @name
end

Instance Method Details

#valuesArray<String>

Allowed values for an attribute.



32
33
34
35
36
37
38
# File 'app/cms/scrivito/attribute_definition.rb', line 32

def values
  if type == 'enum' || type == 'multienum'
    @options[:values] || []
  else
    []
  end
end