Class: EmberCliDeployRedis::Application
- Inherits:
-
Object
- Object
- EmberCliDeployRedis::Application
- Defined in:
- lib/ember_cli_deploy_redis/application.rb
Overview
An application that is deployed and whose revisions can be retrieved.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #active_revision ⇒ Object
-
#initialize(name) ⇒ Application
constructor
A new instance of Application.
-
#latest_revision ⇒ Object
deprecated
Deprecated.
use #active_revision instead
-
#revision_by_name(revision_name) ⇒ Object
Returns the Revision specified by name, or nil if nothing matched.
- #revisions ⇒ Object
Constructor Details
#initialize(name) ⇒ Application
Returns a new instance of Application.
6 7 8 |
# File 'lib/ember_cli_deploy_redis/application.rb', line 6 def initialize(name) self.name = name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/ember_cli_deploy_redis/application.rb', line 4 def name @name end |
Instance Method Details
#active_revision ⇒ Object
20 21 22 |
# File 'lib/ember_cli_deploy_redis/application.rb', line 20 def active_revision EmberCliDeployRedis::Revision.active_from_redis(self) end |
#latest_revision ⇒ Object
Deprecated.
use #active_revision instead
15 16 17 18 |
# File 'lib/ember_cli_deploy_redis/application.rb', line 15 def latest_revision warn "[DEPRECATION] `latest_revision` is deprecated, use `active_revision` instead" active_revision end |
#revision_by_name(revision_name) ⇒ Object
Returns the Revision specified by name, or nil if nothing matched.
25 26 27 |
# File 'lib/ember_cli_deploy_redis/application.rb', line 25 def revision_by_name(revision_name) revisions.find { |r| r.name == revision_name } end |
#revisions ⇒ Object
10 11 12 |
# File 'lib/ember_cli_deploy_redis/application.rb', line 10 def revisions EmberCliDeployRedis::RevisionList.from_redis(self) end |