Sha256: 6e44fdbb8681405ef0e766c0486f0e656a75ef8c4928c89d0117663beab4db88

Contents?: true

Size: 654 Bytes

Versions: 16

Compression:

Stored size: 654 Bytes

Contents

module Rails3::Assist::Directory
  module Root
    module Methods
      def root_directories
        [:app, :config, :db, :public, :lib, :log, :doc, :test, :spec]      
      end

      def root_dir options={}
        raise ArgumentError, "options argument to root_dir must be a hash, was: #{options.inspect}" if options && !options.kind_of?(Hash)
        dir = options[:root_path] if options 
        dir ||= Rails3::Assist::Directory.rails_root || Rails.root
        raise "You must set the Rails app root dir: Rails::Assist::App.root_dir = '/my/root/dir'" if !dir
        dir
      end
    end    
    
    include Methods
    extend Methods
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
rails3_assist-0.3.7 lib/rails3_assist/directory/root.rb
rails3_assist-0.3.6 lib/rails3_assist/directory/root.rb
rails3_assist-0.3.5 lib/rails3_assist/directory/root.rb
rails3_assist-0.3.4 lib/rails3_assist/directory/root.rb
rails3_assist-0.3.3 lib/rails3_assist/directory/root.rb
rails3_assist-0.3.2 lib/rails3_assist/directory/root.rb
rails3_assist-0.3.1 lib/rails3_assist/directory/root.rb
rails3_assist-0.3.0 lib/rails3_assist/directory/root.rb
rails3_assist-0.2.13 lib/rails3_assist/directory/root.rb
rails3_assist-0.2.12 lib/rails3_assist/directory/root.rb
rails3_assist-0.2.11 lib/rails3_assist/directory/root.rb
rails3_assist-0.2.10 lib/rails3_assist/directory/root.rb
rails3_assist-0.2.9 lib/rails3_assist/directory/root.rb
rails3_assist-0.2.8 lib/rails3_assist/directory/root.rb
rails3_assist-0.2.7 lib/rails3_assist/directory/root.rb
rails3_assist-0.2.5 lib/rails3_assist/directory/root.rb