Class: TargetScope
- Inherits:
-
Object
- Object
- TargetScope
- Defined in:
- lib/dsl.rb
Instance Attribute Summary collapse
-
#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(name) ⇒ TargetScope
constructor
A new instance of TargetScope.
- #option(option_name, value) ⇒ Object
- #scheme(name, parent: nil, &block) ⇒ Object
Constructor Details
#initialize(name) ⇒ TargetScope
Returns a new instance of TargetScope.
75 76 77 |
# File 'lib/dsl.rb', line 75 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
73 74 75 |
# File 'lib/dsl.rb', line 73 def name @name end |
Instance Method Details
#capability(capability_name) ⇒ Object
92 93 94 95 |
# File 'lib/dsl.rb', line 92 def capability(capability_name) target_name = @name Ambient.configure { set_capability(target_name, capability_name) } end |
#configure(&block) ⇒ Object
79 80 81 |
# File 'lib/dsl.rb', line 79 def configure(&block) instance_eval(&block) end |
#development_team(team_name) ⇒ Object
97 98 99 100 |
# File 'lib/dsl.rb', line 97 def development_team(team_name) target_name = @name Ambient.configure { set_development_team(target_name, team_name) } end |
#option(option_name, value) ⇒ Object
83 84 85 86 |
# File 'lib/dsl.rb', line 83 def option(option_name, value) target_name = @name Ambient.configure { set_option(option_name, value, target: target_name) } end |
#scheme(name, parent: nil, &block) ⇒ Object
88 89 90 |
# File 'lib/dsl.rb', line 88 def scheme(name, parent: nil, &block) SchemeScope.new(self, name, parent).configure(&block) end |