Class: Locomotive::Liquid::Drops::ContentEntry
- Inherits:
-
Base
- Object
- Liquid::Drop
- Base
- Locomotive::Liquid::Drops::ContentEntry
show all
- Defined in:
- lib/locomotive/liquid/drops/content_entry.rb
Instance Method Summary
collapse
Methods inherited from Base
#id, #initialize, liquify
Instance Method Details
#_id ⇒ Object
8
9
10
|
# File 'lib/locomotive/liquid/drops/content_entry.rb', line 8
def _id
@_source._id.to_s
end
|
#_label ⇒ Object
12
13
14
|
# File 'lib/locomotive/liquid/drops/content_entry.rb', line 12
def _label
@_label ||= @_source._label
end
|
#before_method(meth) ⇒ Object
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# File 'lib/locomotive/liquid/drops/content_entry.rb', line 46
def before_method(meth)
return '' if @_source.nil?
if not @@forbidden_attributes.include?(meth.to_s)
value = @_source.send(meth)
if value.respond_to?(:all) filter_and_order_list(value)
else
value
end
else
nil
end
end
|
#errors ⇒ Object
42
43
44
|
# File 'lib/locomotive/liquid/drops/content_entry.rb', line 42
def errors
@_source.errors.messages.to_hash.stringify_keys
end
|
#next ⇒ Object
Returns the next content for the parent content type.
If no content is found, nil is returned.
Usage:
if article.next %