Sha256: ffcdd8362a85f4e2721e7e3b0ee931c9772cef0168e8ff015d641c0ec9f9cf97

Contents?: true

Size: 500 Bytes

Versions: 1

Compression:

Stored size: 500 Bytes

Contents

module RapiDoc
  module RapiConfig
    def config_dir
      File.join(::Rails.root.to_s, 'config/rapi_doc')
    end

    def template_dir
      File.join(File.dirname(__FILE__), '/../templates')
    end

    def config_file(location)
      File.join(find_location(location), 'config.yml')
    end

    def layout_file(location)
      File.join(find_location(location), 'layout.html.erb')
    end

    def find_location(location)
      location == :target ? config_dir : template_dir
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rapi_doc-0.1.2 lib/rapi_config.rb