Module: Solid

Defined in:
lib/solid.rb,
lib/solid/engine.rb,
lib/solid/version.rb,
lib/solid/iterable.rb,
lib/solid/method_whitelist.rb,
lib/solid/liquid_extensions.rb,
lib/solid/liquid_extensions/if_tag.rb,
lib/solid/liquid_extensions/for_tag.rb,
lib/solid/liquid_extensions/variable.rb,
lib/solid/liquid_extensions/assign_tag.rb,
lib/solid/liquid_extensions/unless_tag.rb

Defined Under Namespace

Modules: Element, Iterable, LiquidExtensions, MethodWhitelist Classes: Arguments, Block, ConditionalBlock, ContextError, Engine, ModelDrop, Parser, Tag, Template

Constant Summary collapse

BASE_PATH =
File.join(File.expand_path(File.dirname(__FILE__)), 'solid')
SyntaxError =
Class.new(Liquid::SyntaxError)
VERSION =
'0.2.2'

Class Method Summary collapse

Class Method Details

.extend_liquid!Object



5
6
7
# File 'lib/solid/liquid_extensions.rb', line 5

def extend_liquid!
  LiquidExtensions.load!
end

.to_liquid(object, context) ⇒ Object



38
39
40
41
42
# File 'lib/solid.rb', line 38

def to_liquid(object, context)
  object = object.to_liquid
  object.context = context if object.respond_to?(:context=)
  object
end

.unproxify(object) ⇒ Object



30
31
32
33
34
35
36
# File 'lib/solid.rb', line 30

def unproxify(object)
  class_name = object.class.name
  if class_name && class_name.end_with?('::LiquidDropClass')
    return object.instance_variable_get('@object')
  end
  object
end