Method: Cog::EmbedContext#initialize

Defined in:
lib/cog/embed_context.rb

#initialize(hook, path, count) ⇒ EmbedContext

Returns a new instance of EmbedContext.

Parameters:

  • hook (String)

    hook name used in the embed statement

  • path (String)

    path to the file in which the cog directive was found

  • count (Fixnum)

    total occurrences in file



36
37
38
39
40
41
42
# File 'lib/cog/embed_context.rb', line 36

def initialize(hook, path, count)
  @hook = hook.to_s
  @path = path.to_s
  @count = count
  @eaten = 0
  @index = 0
end