Class: Pod::Bazel::Target::RuleArgs
- Inherits:
-
Object
- Object
- Pod::Bazel::Target::RuleArgs
- Defined in:
- lib/cocoapods/bazel/target.rb
Instance Attribute Summary collapse
-
#kwargs ⇒ Object
readonly
Returns the value of attribute kwargs.
Instance Method Summary collapse
- #add(name, value, defaults: nil) ⇒ Object
-
#initialize {|_self| ... } ⇒ RuleArgs
constructor
A new instance of RuleArgs.
Constructor Details
#initialize {|_self| ... } ⇒ RuleArgs
Returns a new instance of RuleArgs.
13 14 15 16 17 |
# File 'lib/cocoapods/bazel/target.rb', line 13 def initialize @kwargs = {} yield self if block_given? end |
Instance Attribute Details
#kwargs ⇒ Object (readonly)
Returns the value of attribute kwargs.
11 12 13 |
# File 'lib/cocoapods/bazel/target.rb', line 11 def kwargs @kwargs end |
Instance Method Details
#add(name, value, defaults: nil) ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/cocoapods/bazel/target.rb', line 19 def add(name, value, defaults: nil) return self if defaults&.include?(value) raise 'Duplicate' if kwargs.key?(name) kwargs[name] = value self end |