Module: Alchemy::Element::Definitions::ClassMethods

Defined in:
app/models/alchemy/element/definitions.rb

Instance Method Summary collapse

Instance Method Details

#definition_by_name(name) ⇒ Object

Returns one element definition by given name.


22
23
24
# File 'app/models/alchemy/element/definitions.rb', line 22

def definition_by_name(name)
  ElementDefinition.get(name)
end

#definitionsObject

Returns the definitions from elements.yml file.

Place a elements.yml file inside your apps config/alchemy folder to define your own set of elements


16
17
18
# File 'app/models/alchemy/element/definitions.rb', line 16

def definitions
  ElementDefinition.all
end