Parent

Class Index [+]

Quicksearch

Capistrano::Configuration::Namespaces::Namespace

Public Class Methods

new(name, parent) click to toggle source
     # File lib/capistrano/configuration/namespaces.rb, line 176
176:           def initialize(name, parent)
177:             @parent = parent
178:             @name = name
179:             
180:             explicitly_define_clashing_kernel_methods
181:           end

Public Instance Methods

method_missing(sym, *args, &block) click to toggle source
     # File lib/capistrano/configuration/namespaces.rb, line 191
191:           def method_missing(sym, *args, &block)
192:             if parent.respond_to?(sym)
193:               parent.send(sym, *args, &block)
194:             else
195:               super
196:             end
197:           end
respond_to?(sym, include_priv=false) click to toggle source
     # File lib/capistrano/configuration/namespaces.rb, line 187
187:           def respond_to?(sym, include_priv=false)
188:             super || parent.respond_to?(sym, include_priv)
189:           end
role(*args) click to toggle source
     # File lib/capistrano/configuration/namespaces.rb, line 183
183:           def role(*args)
184:             raise NotImplementedError, "roles cannot be defined in a namespace"
185:           end

Protected Instance Methods

explicitly_define_clashing_kernel_methods() click to toggle source
     # File lib/capistrano/configuration/namespaces.rb, line 204
204:             def explicitly_define_clashing_kernel_methods
205:               (parent.public_methods & Kernel.methods).each do |m|
206:                 next if self.method(m).owner == self.class
207:                 if parent.method(m).owner == parent.class
208:                   metaclass = class << self; self; end
209:                   metaclass.send(:define_method, m) {|*args, &block| parent.send(m, *args, &block)}
210:                 end
211:               end
212:             end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.