Class: MetaCL::Templates::Wrapper

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#inner_codeObject

Returns the value of attribute inner_code.



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

def inner_code
  @inner_code
end

#outer_codeObject

Returns the value of attribute outer_code.



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

def outer_code
  @outer_code
end

#post_init_codeObject

Returns the value of attribute post_init_code.



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

def post_init_code
  @post_init_code
end

Instance Method Details

#render(inner_code, post_init_code, outer_code, platform) ⇒ Object



6
7
8
9
# File 'lib/metacl/templates/wrapper.rb', line 6

def render(inner_code, post_init_code, outer_code, platform)
  @inner_code, @post_init_code, @outer_code = Utils.tab_text(inner_code), Utils.tab_text(post_init_code), outer_code
  super IO.read("#{__dir__}/wrapper.#{platform}.template")
end