Class: Ambient::DSL::TargetScope
- Inherits:
-
Object
- Object
- Ambient::DSL::TargetScope
- Defined in:
- lib/ambient/dsl/target_scope.rb
Instance Attribute Summary collapse
-
#application ⇒ Object
readonly
Returns the value of attribute application.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #capability(capability_name) ⇒ Object
- #configure(&block) ⇒ Object
- #development_team(team_name) ⇒ Object
-
#initialize(application, name) ⇒ TargetScope
constructor
A new instance of TargetScope.
- #option(option_name, value) ⇒ Object
- #scheme(name, parent: nil, &block) ⇒ Object
Constructor Details
#initialize(application, name) ⇒ TargetScope
Returns a new instance of TargetScope.
7 8 9 10 |
# File 'lib/ambient/dsl/target_scope.rb', line 7 def initialize(application, name) @application = application @name = name end |
Instance Attribute Details
#application ⇒ Object (readonly)
Returns the value of attribute application.
4 5 6 |
# File 'lib/ambient/dsl/target_scope.rb', line 4 def application @application end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/ambient/dsl/target_scope.rb', line 4 def name @name end |
Instance Method Details
#capability(capability_name) ⇒ Object
25 26 27 28 |
# File 'lib/ambient/dsl/target_scope.rb', line 25 def capability(capability_name) target_name = @name application.configure { set_capability(target_name, capability_name) } end |
#configure(&block) ⇒ Object
12 13 14 |
# File 'lib/ambient/dsl/target_scope.rb', line 12 def configure(&block) instance_eval(&block) end |
#development_team(team_name) ⇒ Object
30 31 32 33 |
# File 'lib/ambient/dsl/target_scope.rb', line 30 def development_team(team_name) target_name = @name application.configure { set_development_team(target_name, team_name) } end |
#option(option_name, value) ⇒ Object
16 17 18 19 |
# File 'lib/ambient/dsl/target_scope.rb', line 16 def option(option_name, value) target_name = @name application.configure { set_option(option_name, value, target: target_name) } end |
#scheme(name, parent: nil, &block) ⇒ Object
21 22 23 |
# File 'lib/ambient/dsl/target_scope.rb', line 21 def scheme(name, parent: nil, &block) SchemeScope.new(application, self, name, parent).configure(&block) end |