Module: Hubcap
- Defined in:
- lib/hubcap.rb,
lib/hubcap/version.rb
Defined Under Namespace
Classes: Application, ApplicationModeError, CapistranoAlreadyConfigured, Group, GroupWithoutParent, HostCircularReference, Hub, InvalidParamKeyType, NestedApplicationDisallowed, Server, ServerAddressUnknown, ServerSubgroupDisallowed
Constant Summary
collapse
- VERSION =
'1.1.0'
Class Method Summary
collapse
Class Method Details
.hub(filter_string = '', &blk) ⇒ Object
6
7
8
|
# File 'lib/hubcap.rb', line 6
def self.hub(filter_string = '', &blk)
Hubcap::Hub.new(filter_string).tap { |scope| scope.instance_eval(&blk) }
end
|
.load(filter_string, *paths) ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/hubcap.rb', line 11
def self.load(filter_string, *paths)
Hubcap::Hub.new(filter_string).tap { |scope|
while paths.any?
path = paths.shift
if File.directory?(path)
paths += Dir.glob(File.join(path, '*.rb'))
else
scope.absorb(path)
end
end
}
end
|