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.
169 170 171 |
# File 'lib/dsl.rb', line 169 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
167 168 169 |
# File 'lib/dsl.rb', line 167 def name @name end |
Instance Method Details
#capability(capability_name) ⇒ Object
186 187 188 189 |
# File 'lib/dsl.rb', line 186 def capability(capability_name) target_name = @name Ambient.configure { set_capability(target_name, capability_name) } end |
#configure(&block) ⇒ Object
173 174 175 |
# File 'lib/dsl.rb', line 173 def configure(&block) instance_eval(&block) end |
#development_team(team_name) ⇒ Object
191 192 193 194 |
# File 'lib/dsl.rb', line 191 def development_team(team_name) target_name = @name Ambient.configure { set_development_team(target_name, team_name) } end |
#option(option_name, value) ⇒ Object
177 178 179 180 |
# File 'lib/dsl.rb', line 177 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
182 183 184 |
# File 'lib/dsl.rb', line 182 def scheme(name, parent: nil, &block) SchemeScope.new(self, name, parent).configure(&block) end |