Class: LTX::Config
- Inherits:
-
Object
- Object
- LTX::Config
- Defined in:
- lib/ltx/config.rb
Overview
Load config from project.yaml
Defined Under Namespace
Classes: Error
Constant Summary collapse
- MISSING_MAIN_ERROR =
'Please supply path to main tex file!'
- DEFAULT_PROJECT_YAML =
'project.yml'
- DEFAULT_MAIN_TEX =
'main.tex'
Instance Attribute Summary collapse
-
#compile_dir ⇒ Object
readonly
Returns the value of attribute compile_dir.
-
#compiler ⇒ Object
readonly
Returns the value of attribute compiler.
-
#main ⇒ Object
readonly
Returns the value of attribute main.
-
#timeout ⇒ Object
readonly
Returns the value of attribute timeout.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
-
#version_prefix ⇒ Object
readonly
Returns the value of attribute version_prefix.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #root ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
20 21 22 23 |
# File 'lib/ltx/config.rb', line 20 def initialize @config = load_config fetch_settings end |
Instance Attribute Details
#compile_dir ⇒ Object (readonly)
Returns the value of attribute compile_dir.
10 11 12 |
# File 'lib/ltx/config.rb', line 10 def compile_dir @compile_dir end |
#compiler ⇒ Object (readonly)
Returns the value of attribute compiler.
9 10 11 |
# File 'lib/ltx/config.rb', line 9 def compiler @compiler end |
#main ⇒ Object (readonly)
Returns the value of attribute main.
8 9 10 |
# File 'lib/ltx/config.rb', line 8 def main @main end |
#timeout ⇒ Object (readonly)
Returns the value of attribute timeout.
11 12 13 |
# File 'lib/ltx/config.rb', line 11 def timeout @timeout end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
12 13 14 |
# File 'lib/ltx/config.rb', line 12 def title @title end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
13 14 15 |
# File 'lib/ltx/config.rb', line 13 def version @version end |
#version_prefix ⇒ Object (readonly)
Returns the value of attribute version_prefix.
14 15 16 |
# File 'lib/ltx/config.rb', line 14 def version_prefix @version_prefix end |
Instance Method Details
#root ⇒ Object
25 26 27 |
# File 'lib/ltx/config.rb', line 25 def root File.dirname(@main) end |