Class: Indoctrinatr::Tools::ContentForTexFiles
- Inherits:
-
Object
- Object
- Indoctrinatr::Tools::ContentForTexFiles
show all
- Defined in:
- lib/indoctrinatr/tools/content_for_tex_files.rb
Instance Method Summary
collapse
Constructor Details
a class that DefaultValues, TemplateDocumentationContent, and field_names_as_variables should inherit from or to be precise: When we want use variables in an indoctrinatr tex.erb file, we should use this class
8
9
10
11
|
# File 'lib/indoctrinatr/tools/content_for_tex_files.rb', line 8
def initialize(configuration)
@_configuration = configuration
_build_from_configuration
end
|
Instance Method Details
#_build_from_configuration ⇒ Object
31
32
33
34
35
|
# File 'lib/indoctrinatr/tools/content_for_tex_files.rb', line 31
def _build_from_configuration
@_template_asset_path = @_configuration.template_asset_path
@_output_file_name = @_configuration.output_file_name @_default_file_name = @_configuration.default_file_name end
|
#customized_output_file_name ⇒ Object
21
22
23
24
25
|
# File 'lib/indoctrinatr/tools/content_for_tex_files.rb', line 21
def customized_output_file_name
return @customized_output_file_name if defined? @customized_output_file_name
@customized_output_file_name = eval("\"#{@_output_file_name}\"", binding, __FILE__, __LINE__) end
|
#retrieve_binding ⇒ Object
17
18
19
|
# File 'lib/indoctrinatr/tools/content_for_tex_files.rb', line 17
def retrieve_binding
binding
end
|
#template_asset_path ⇒ Object
27
28
29
|
# File 'lib/indoctrinatr/tools/content_for_tex_files.rb', line 27
def template_asset_path
@_template_asset_path
end
|
#textile2latex(textile) ⇒ Object
13
14
15
|
# File 'lib/indoctrinatr/tools/content_for_tex_files.rb', line 13
def textile2latex(textile)
RedCloth.new(textile).to_latex
end
|