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.


46
47
48
49
50
51
52
53
# File 'app/models/alchemy/element/definitions.rb', line 46

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