module Astromapper
Constants
- VERSION
Public Class Methods
config(root_dir = nil)
click to toggle source
# File lib/astromapper.rb, line 31 def self.config(root_dir = nil) root_dir ||= Pathname.new(Dir.pwd) path = root_dir.join("_astromapper.yml") raise "Invalid Bookmaker directory; couldn't found #{path} file." unless File.file?(path) content = File.read(path) erb = ERB.new(content).result YAML.load(erb).to_hash.with_indifferent_access end
logger()
click to toggle source
# File lib/astromapper.rb, line 54 def self.logger @logger ||= Logger.new(File.open("/tmp/astromapper.log", "a")) end
names(root_dir = nil)
click to toggle source
# File lib/astromapper.rb, line 44 def self.names(root_dir = nil) root_dir ||= Pathname.new(Dir.pwd) path = root_dir.join("templates/names.yml") raise "Invalid Bookmaker directory; couldn't found #{path} file." unless File.file?(path) content = File.read(path) erb = ERB.new(content).result @names = YAML.load(erb) end
output_file(ext="txt")
click to toggle source
# File lib/astromapper.rb, line 41 def self.output_file(ext="txt") "output/#{config['name'].to_permalink}.#{ext}" end