Class: MetaCL::Templates::InitArray

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fill_withObject (readonly)

Returns the value of attribute fill_with.



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

def fill_with
  @fill_with
end

#lengthObject (readonly)

Returns the value of attribute length.



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

def length
  @length
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end

Instance Method Details

#render(name, type, length, fill_with, platform) ⇒ Object



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

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