Module: Redirect::Rails
- Defined in:
- lib/redirect/rails.rb,
lib/redirect/rails/version.rb
Overview
Redirect::Rails
Defined Under Namespace
Constant Summary collapse
- VERSION =
"0.3.5"
Class Method Summary collapse
Class Method Details
.hosts ⇒ Object
30 31 32 |
# File 'lib/redirect/rails.rb', line 30 def hosts YAML.safe_load(File.read(yaml_name))["hosts"] end |
.original_yaml_name ⇒ Object
34 35 36 |
# File 'lib/redirect/rails.rb', line 34 def original_yaml_name "#{Redirect::Rails.root}/config/redirect.yml" end |
.paths ⇒ Object
26 27 28 |
# File 'lib/redirect/rails.rb', line 26 def paths YAML.safe_load(File.read(yaml_name))["paths"] end |
.root ⇒ Object
22 23 24 |
# File 'lib/redirect/rails.rb', line 22 def root File. "../..", __dir__ end |
.yaml_name ⇒ Object
38 39 40 |
# File 'lib/redirect/rails.rb', line 38 def yaml_name "#{::Rails.root}/config/redirect.yml" end |