Class: Liquid::SnippetDrop

Inherits:
Drop
  • Object
show all
Defined in:
lib/liquid/snippet_drop.rb

Instance Attribute Summary collapse

Attributes inherited from Drop

#context

Instance Method Summary collapse

Methods inherited from Drop

#inspect, invokable?, invokable_methods, #invoke_drop, #key?, #liquid_method_missing, #to_liquid

Constructor Details

#initialize(body, name, filename) ⇒ SnippetDrop

Returns a new instance of SnippetDrop.



7
8
9
10
11
12
# File 'lib/liquid/snippet_drop.rb', line 7

def initialize(body, name, filename)
  super()
  @body = body
  @name = name
  @filename = filename
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



5
6
7
# File 'lib/liquid/snippet_drop.rb', line 5

def body
  @body
end

#filenameObject (readonly)

Returns the value of attribute filename.



5
6
7
# File 'lib/liquid/snippet_drop.rb', line 5

def filename
  @filename
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/liquid/snippet_drop.rb', line 5

def name
  @name
end

Instance Method Details

#to_partialObject



14
15
16
# File 'lib/liquid/snippet_drop.rb', line 14

def to_partial
  @body
end

#to_sObject



18
19
20
# File 'lib/liquid/snippet_drop.rb', line 18

def to_s
  'SnippetDrop'
end