Class: Amrita2::Renderers::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/amrita2/template.rb,
lib/amrita2/template.rb

Instance Method Summary collapse

Constructor Details

#initialize(type_name) ⇒ Base

Returns a new instance of Base.



1868
1869
1870
# File 'lib/amrita2/template.rb', line 1868

def initialize(type_name)
  @type_name = type_name
end

Instance Method Details

#generate_when(cg) ⇒ Object



1872
1873
1874
1875
1876
# File 'lib/amrita2/template.rb', line 1872

def generate_when(cg)
  cg.when_(@type_name) do
    yield
  end
end