Class: Statistrano::Deployment::Strategy::Branches::Index
- Inherits:
-
Object
- Object
- Statistrano::Deployment::Strategy::Branches::Index
- Defined in:
- lib/statistrano/deployment/strategy/branches/index.rb
Defined Under Namespace
Classes: ERBContext
Instance Attribute Summary collapse
-
#releases ⇒ Object
readonly
Returns the value of attribute releases.
-
#template ⇒ Object
readonly
Returns the value of attribute template.
Instance Method Summary collapse
-
#initialize(releases, template_path = nil) ⇒ Index
constructor
A new instance of Index.
- #to_html ⇒ Object
Constructor Details
#initialize(releases, template_path = nil) ⇒ Index
Returns a new instance of Index.
12 13 14 15 |
# File 'lib/statistrano/deployment/strategy/branches/index.rb', line 12 def initialize releases, template_path=nil @releases = releases @template = IO.read(template_path || File.("../index/template.html.erb", __FILE__)) end |
Instance Attribute Details
#releases ⇒ Object (readonly)
Returns the value of attribute releases.
10 11 12 |
# File 'lib/statistrano/deployment/strategy/branches/index.rb', line 10 def releases @releases end |
#template ⇒ Object (readonly)
Returns the value of attribute template.
10 11 12 |
# File 'lib/statistrano/deployment/strategy/branches/index.rb', line 10 def template @template end |
Instance Method Details
#to_html ⇒ Object
17 18 19 |
# File 'lib/statistrano/deployment/strategy/branches/index.rb', line 17 def to_html ERB.new(template).result(ERBContext.new(releases).get_binding) end |