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 Also known as: description

The definition of this element.



41
42
43
44
45
46
47
48
# File 'app/models/alchemy/element/definitions.rb', line 41

def definition
  if definition = self.class.definitions.detect { |d| d['name'] == name }
    definition
  else
    log_warning "Could not find element definition for #{self.name}. Please check your elements.yml file!"
    return {}
  end
end