Parent

Files

Class/Module Index [+]

Quicksearch

Capistrano::Role::DynamicServerList

This is the combination of a block, a hash of options, and a cached value.

Public Class Methods

new(block, options) click to toggle source
# File lib/capistrano/role.rb, line 49
def initialize (block, options)
  @block = block
  @options = options
  @cached = []
  @is_cached = false
end

Public Instance Methods

reset!() click to toggle source

Clear the cached value

# File lib/capistrano/role.rb, line 66
def reset!
  @cached.clear
  @is_cached = false
end
to_ary() click to toggle source

Convert to a list of ServerDefinitions

# File lib/capistrano/role.rb, line 57
def to_ary
  unless @is_cached
    @cached = Role::wrap_list(@block.call(@options), @options)
    @is_cached = true
  end
  @cached
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.