Module: Alchemy::Element::Definitions

Extended by:
ActiveSupport::Concern
Included in:
Alchemy::Element
Defined in:
app/models/alchemy/element/definitions.rb

Overview

Module concerning element definitions

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#definitionObject

The definition of this element.


29
30
31
32
33
34
35
36
37
# File 'app/models/alchemy/element/definitions.rb', line 29

def definition
  if definition = self.class.definition_by_name(name)
    definition
  else
    log_warning "Could not find element definition for #{name}. " \
                "Please check your elements.yml file!"
    {}
  end
end