Module: Solid::Element::ClassMethods

Defined in:
lib/solid/element.rb

Instance Method Summary collapse

Instance Method Details

#context_attribute(name) ⇒ Object



43
44
45
46
47
# File 'lib/solid/element.rb', line 43

def context_attribute(name)
  define_method(name) do
    Solid.unproxify(current_context[name.to_s])
  end
end

#tag_name(value = nil) ⇒ Object



35
36
37
38
39
40
41
# File 'lib/solid/element.rb', line 35

def tag_name(value=nil)
  if value
    @tag_name = value
    Liquid::Template.register_tag(value.to_s, self)
  end
  @tag_name
end