Class: Smartguard::Application
- Inherits:
-
Object
- Object
- Smartguard::Application
- Defined in:
- lib/smartguard/application.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#active_path ⇒ Object
readonly
Returns the value of attribute active_path.
-
#current_path ⇒ Object
readonly
Returns the value of attribute current_path.
-
#releases_path ⇒ Object
readonly
Returns the value of attribute releases_path.
-
#shared_path ⇒ Object
readonly
Returns the value of attribute shared_path.
Instance Method Summary collapse
-
#initialize(path) ⇒ Application
constructor
A new instance of Application.
Constructor Details
#initialize(path) ⇒ Application
Returns a new instance of Application.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/smartguard/application.rb', line 5 def initialize(path) @base_path = Pathname.new(File.absolute_path path) if Smartguard.environment == :production @current_path = @base_path.join('current') @releases_path = @base_path.join('releases') @shared_path = @base_path.join('shared') @active_path = File.readlink @current_path else @current_path = @base_path @releases_path = @base_path.join('tmp/releases') @shared_path = @base_path @active_path = @base_path end end |
Instance Attribute Details
#active_path ⇒ Object (readonly)
Returns the value of attribute active_path.
3 4 5 |
# File 'lib/smartguard/application.rb', line 3 def active_path @active_path end |
#current_path ⇒ Object (readonly)
Returns the value of attribute current_path.
3 4 5 |
# File 'lib/smartguard/application.rb', line 3 def current_path @current_path end |
#releases_path ⇒ Object (readonly)
Returns the value of attribute releases_path.
3 4 5 |
# File 'lib/smartguard/application.rb', line 3 def releases_path @releases_path end |
#shared_path ⇒ Object (readonly)
Returns the value of attribute shared_path.
3 4 5 |
# File 'lib/smartguard/application.rb', line 3 def shared_path @shared_path end |