Class: MetaCL::Templates::InitMatrix

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fill_withObject

Returns the value of attribute fill_with.



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

def fill_with
  @fill_with
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#size_mObject

Returns the value of attribute size_m.



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

def size_m
  @size_m
end

#size_nObject

Returns the value of attribute size_n.



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

def size_n
  @size_n
end

#typeObject

Returns the value of attribute type.



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

def type
  @type
end

Instance Method Details

#render(name, type, size_n, size_m, fill_with, platform) ⇒ Object



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

def render(name, type, size_n, size_m, fill_with, platform)
  @name, @type, @size_n, @size_m, @fill_with = name, type, size_n, size_m, fill_with
  super IO.read("#{__dir__}/init_matrix.#{platform}.template")
end