Sha256: 13197ecacfc54336e8d42b49a60d130a6e76a058d34d3acac1a155211f05b9ff

Contents?: true

Size: 1.45 KB

Versions: 1

Compression:

Stored size: 1.45 KB

Contents

#!/usr/bin/env ruby
# encoding: utf-8
# @author Sascha Manns
# @abstract GetConfig Module for latex_curriculum_vitae
#
# Copyright (C) 2015  Sascha Manns <samannsml@directbox.com>
# License: MIT

# Dependencies
require 'parseconfig'

# main module
module LatexCurriculumVitae
  # Module for creating the GetConfig
  module GetConfig
    # This method gets the configs from the config file
    # @return [Array] name_of_pdf, name_of_cover, name_of_resume, name_of_letter
    def self.get
      home = Dir.home
      config = ParseConfig.new("#{home}/.latex_curriculum_vitae/latex_curriculum_vitae.cfg")
      name_of_pdf = config['name_of_pdf']
      name_of_cover = config['name_of_cover']
      name_of_resume = config['name_of_resume']
      name_of_letter = config['name_of_letter']
      pdf_reader = config['pdf_reader']
      [name_of_pdf, name_of_cover, name_of_resume, name_of_letter, pdf_reader]
    end

    # Method for getting smtp configuration
    # @return [Array] own_name, own_email_address, own_smtp, own_username, own_password
    def self.get_smtp
      home = Dir.home
      config = ParseConfig.new("#{home}/.latex_curriculum_vitae/latex_curriculum_vitae.cfg")
      # own_name = config['own_name']
      own_email_address = config['own_email_address']
      own_smtp = config['own_smtp']
      own_username = config['own_username']
      own_password = config['own_password']

      [own_email_address, own_smtp, own_username, own_password]
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
latex_curriculum_vitae-1.1.3 lib/latex_curriculum_vitae/get-config.rb