Class: MetaCL::Templates::Kernel

Inherits:
Mustache
  • Object
show all
Defined in:
lib/metacl/templates/kernel.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



4
5
6
# File 'lib/metacl/templates/kernel.rb', line 4

def code
  @code
end

#counterObject (readonly)

Returns the value of attribute counter.



4
5
6
# File 'lib/metacl/templates/kernel.rb', line 4

def counter
  @counter
end

#m_fromObject (readonly)

Returns the value of attribute m_from.



4
5
6
# File 'lib/metacl/templates/kernel.rb', line 4

def m_from
  @m_from
end

#n_fromObject (readonly)

Returns the value of attribute n_from.



4
5
6
# File 'lib/metacl/templates/kernel.rb', line 4

def n_from
  @n_from
end

#paramsObject (readonly)

Returns the value of attribute params.



4
5
6
# File 'lib/metacl/templates/kernel.rb', line 4

def params
  @params
end

Instance Method Details

#render(params, code, n_from, m_from, counter) ⇒ Object



6
7
8
9
10
11
# File 'lib/metacl/templates/kernel.rb', line 6

def render(params, code, n_from, m_from, counter)
  @counter = counter
  @params, @code = params, code
  @n_from, @m_from = n_from, m_from
  super IO.read("#{__dir__}/kernel.cl.template")
end