Class: Teapot::Command::Selection
- Inherits:
-
Samovar::Command
- Object
- Samovar::Command
- Teapot::Command::Selection
show all
- Defined in:
- lib/teapot/command/selection.rb
Instance Method Summary
collapse
Instance Method Details
#call ⇒ Object
44
45
46
47
48
|
# File 'lib/teapot/command/selection.rb', line 44
def call
context = parent.context
self.process(selection(parent.context))
end
|
#selection(context) ⇒ Object
36
37
38
39
40
41
42
|
# File 'lib/teapot/command/selection.rb', line 36
def selection(context)
if targets = self.targets
context.select(targets)
else
context.select(context.configuration[:build])
end
end
|
#targets ⇒ Object
30
31
32
33
34
|
# File 'lib/teapot/command/selection.rb', line 30
def targets
if @targets and @targets.any?
Set.new(@targets)
end
end
|