Class: HardCiter::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/hardciter/configuration.rb

Constant Summary collapse

CSL =
File.expand_path("../../../examples/plos.csl", __FILE__)
BIBLIOGRAPHY_PATTERN =
/\{papers2_bibliography\}/
INTEXT_PATTERN =
/\{(\w*:\w*)\}/
CITE_KEY_PATTERN =
/\w*:\w*/
BIBTEX_LIBRARY_REGEX =
/\.bib$/

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



17
18
19
# File 'lib/hardciter/configuration.rb', line 17

def initialize
  self.reset
end

Instance Attribute Details

#bibliography_patternObject

Returns the value of attribute bibliography_pattern.



3
4
5
# File 'lib/hardciter/configuration.rb', line 3

def bibliography_pattern
  @bibliography_pattern
end

#bibtex_library_regexObject

Returns the value of attribute bibtex_library_regex.



3
4
5
# File 'lib/hardciter/configuration.rb', line 3

def bibtex_library_regex
  @bibtex_library_regex
end

#cite_key_patternObject

Returns the value of attribute cite_key_pattern.



3
4
5
# File 'lib/hardciter/configuration.rb', line 3

def cite_key_pattern
  @cite_key_pattern
end

#cslObject

Returns the value of attribute csl.



3
4
5
# File 'lib/hardciter/configuration.rb', line 3

def csl
  @csl
end

#intext_patternObject

Returns the value of attribute intext_pattern.



3
4
5
# File 'lib/hardciter/configuration.rb', line 3

def intext_pattern
  @intext_pattern
end

Instance Method Details

#resetObject



21
22
23
24
25
26
27
# File 'lib/hardciter/configuration.rb', line 21

def reset
  @csl = CSL
  @bibliography_pattern = BIBLIOGRAPHY_PATTERN
  @intext_pattern = INTEXT_PATTERN
  @cite_key_pattern = CITE_KEY_PATTERN
  @bibtex_library_regex = BIBTEX_LIBRARY_REGEX
end