Class: Poisol::Domain
- Inherits:
-
Object
- Object
- Poisol::Domain
- Defined in:
- lib/poisol/domain.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#full_url ⇒ Object
readonly
Returns the value of attribute full_url.
Instance Method Summary collapse
-
#initialize(domain_config_file) ⇒ Domain
constructor
A new instance of Domain.
Constructor Details
#initialize(domain_config_file) ⇒ Domain
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/poisol/domain.rb', line 5 def initialize domain_config_file @file = domain_config_file path = "" if File.exists? @file base_hash = Parse.yaml_file @file sub_domain = base_hash["sub_domain"] path = "/#{sub_domain}" if sub_domain.present? end @full_url = "#{ path.present? ? path: ''}" end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
3 4 5 |
# File 'lib/poisol/domain.rb', line 3 def file @file end |
#full_url ⇒ Object (readonly)
Returns the value of attribute full_url.
3 4 5 |
# File 'lib/poisol/domain.rb', line 3 def full_url @full_url end |