Class: Locomotive::Steam::Decorators::TemplateDecorator

Inherits:
I18nDecorator
  • Object
show all
Defined in:
lib/locomotive/steam/decorators/template_decorator.rb

Direct Known Subclasses

PageDecorator

Instance Attribute Summary

Attributes inherited from I18nDecorator

#__default_locale__, #__frozen_locale__, #__locale__, #__localized_attributes__

Instance Method Summary collapse

Methods inherited from I18nDecorator

#__freeze_locale__, #__get_localized_value__, #__is_localized_attribute__, #__set_localized_value__, #__unfreeze_locale__, #__with_default_locale__, #__with_locale__, #as_json, decorate, #initialize, #inspect, #method_missing, #to_hash, #to_json

Constructor Details

This class inherits a constructor from Locomotive::Steam::Decorators::I18nDecorator

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Locomotive::Steam::Decorators::I18nDecorator

Instance Method Details

#liquid_sourceObject



9
10
11
12
13
14
15
# File 'lib/locomotive/steam/decorators/template_decorator.rb', line 9

def liquid_source
  if respond_to?(:template_path) && template_path
    source_from_template_file
  else
    self.source.blank? ? source_in_default_locale : self.source
  end
end