Sha256: 9c0960de8e148bc36dbb00fd6f41c93aeb5ac70fb729fd9879eca0118c893c07

Contents?: true

Size: 482 Bytes

Versions: 10

Compression:

Stored size: 482 Bytes

Contents

module Georgia
  module Paths

    # Should be in a helper
    def app_path
      File.expand_path('../../app', called_from)
    end

    def decorator_path name
      File.expand_path("decorators/georgia/#{name}_decorator.rb", app_path)
    end

    %w{controller helper mailer model}.each do |resource|
      class_eval <<-RUBY
      def #{resource}_path(name)
        File.expand_path("#{resource.pluralize}/georgia/\#{name}.rb", app_path)
      end
      RUBY
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
georgia-0.8.0 lib/georgia/paths.rb
georgia-0.7.8 lib/georgia/paths.rb
georgia-0.7.7 lib/georgia/paths.rb
georgia-0.7.6 lib/georgia/paths.rb
georgia-0.7.5 lib/georgia/paths.rb
georgia-0.7.4 lib/georgia/paths.rb
georgia-0.7.3 lib/georgia/paths.rb
georgia-0.7.2 lib/georgia/paths.rb
georgia-0.7.1 lib/georgia/paths.rb
georgia-0.7.0 lib/georgia/paths.rb