Class: Polyn::Configuration
- Inherits:
-
Object
- Object
- Polyn::Configuration
- Defined in:
- lib/polyn/configuration.rb
Overview
Configuration data for Polyn
Instance Attribute Summary collapse
-
#polyn_env ⇒ Object
readonly
Returns the value of attribute polyn_env.
Instance Method Summary collapse
- #domain ⇒ Object
- #domain=(name) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #source_root ⇒ Object
- #source_root=(name) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 11 |
# File 'lib/polyn/configuration.rb', line 7 def initialize @domain = nil @source_root = nil @polyn_env = ENV["POLYN_ENV"] || ENV["RAILS_ENV"] || "development" end |
Instance Attribute Details
#polyn_env ⇒ Object (readonly)
Returns the value of attribute polyn_env.
13 14 15 |
# File 'lib/polyn/configuration.rb', line 13 def polyn_env @polyn_env end |
Instance Method Details
#domain ⇒ Object
15 16 17 |
# File 'lib/polyn/configuration.rb', line 15 def domain @domain ||= Polyn::Naming.validate_domain_name!(@domain) end |
#domain=(name) ⇒ Object
19 20 21 22 |
# File 'lib/polyn/configuration.rb', line 19 def domain=(name) Polyn::Naming.validate_domain_name!(name) @domain = name end |
#source_root ⇒ Object
24 25 26 |
# File 'lib/polyn/configuration.rb', line 24 def source_root @source_root ||= Polyn::Naming.validate_source_root!(@source_root) end |
#source_root=(name) ⇒ Object
28 29 30 31 |
# File 'lib/polyn/configuration.rb', line 28 def source_root=(name) Polyn::Naming.validate_source_root!(name) @source_root = name end |