Class: Minitest::Apidoc::Template

Inherits:
Mustache
  • Object
show all
Defined in:
lib/minitest/apidoc/template.rb

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(groups) ⇒ Template

Returns a new instance of Template


15
16
17
# File 'lib/minitest/apidoc/template.rb', line 15

def initialize(groups)
  @groups = groups
end

Class Attribute Details

.blurbObject

Returns the value of attribute blurb


7
8
9
# File 'lib/minitest/apidoc/template.rb', line 7

def blurb
  @blurb
end

.output_fileObject

Returns the value of attribute output_file


7
8
9
# File 'lib/minitest/apidoc/template.rb', line 7

def output_file
  @output_file
end

.template_fileObject

Returns the value of attribute template_file


7
8
9
# File 'lib/minitest/apidoc/template.rb', line 7

def template_file
  @template_file
end

Instance Attribute Details

#groupsObject (readonly)

Returns the value of attribute groups


10
11
12
# File 'lib/minitest/apidoc/template.rb', line 10

def groups
  @groups
end

Instance Method Details

#blurbObject


19
20
21
# File 'lib/minitest/apidoc/template.rb', line 19

def blurb
  self.class.blurb
end

#writeObject


23
24
25
26
27
# File 'lib/minitest/apidoc/template.rb', line 23

def write
  File.open(self.class.output_file, "w") do |file|
    file.write(render)
  end
end