Sha256: 7ccf92454a53a808a62f6b58b8df75c97748e9e129497b8a773c43333ecfefa4
Contents?: true
Size: 739 Bytes
Versions: 12
Compression:
Stored size: 739 Bytes
Contents
module Magicspec class Initializer def initialize root, app_name @root ||= root @app_name ||= app_name @pages_path = File.join(@root, 'app', 'pages') $:.unshift(@pages_path) load_config load_all_pages generate_pathes end def load_all_pages Dir.glob(File.join @pages_path, '**', '*.rb').select { |p| p =~ /page\.rb$/ }.each do |page| puts "#{page}" if $debug require "#{page}" end #each end def load_config # hard code config file name here @config_file = File.join @root, 'config', 'config.yml' $config = Config.new(@config_file).content end def generate_pathes $root = @root $pages = @pages_path end end end #Magicspec
Version data entries
12 entries across 12 versions & 1 rubygems