Class: Indoctrinatr::Tools::DefaultValues

Inherits:
ContentForTexFiles show all
Defined in:
lib/indoctrinatr/tools/default_values.rb

Instance Method Summary collapse

Methods inherited from ContentForTexFiles

#_build_from_configuration, #customized_output_file_name, #initialize, #retrieve_binding, #template_asset_path, #textile2latex

Constructor Details

This class inherits a constructor from Indoctrinatr::Tools::ContentForTexFiles

Instance Method Details

#_use_default_valuesObject



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/indoctrinatr/tools/default_values.rb', line 12

def _use_default_values
  @_configuration.attributes_as_hashes_in_array.each do |attribute_hash|
    instance_variable_set("@_#{attribute_hash['name']}", attribute_hash['default_value'])

    define_singleton_method "raw_#{attribute_hash['name']}".to_sym do
      instance_variable_get("@_#{attribute_hash['name']}")
    end

    define_singleton_method attribute_hash['name'].to_sym do
      instance_variable_get("@_#{attribute_hash['name']}").to_latex
    end
  end
end

#default_file_nameObject



8
9
10
# File 'lib/indoctrinatr/tools/default_values.rb', line 8

def default_file_name
  @_default_file_name
end

#output_file_nameObject



4
5
6
# File 'lib/indoctrinatr/tools/default_values.rb', line 4

def output_file_name
  @_output_file_name
end