Class: OpenX::TargetingRules
- Inherits:
-
Array
- Object
- Array
- OpenX::TargetingRules
- Defined in:
- lib/openx/targeting_rules.rb
Overview
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(&block) ⇒ TargetingRules
constructor
A new instance of TargetingRules.
Constructor Details
#initialize(&block) ⇒ TargetingRules
Returns a new instance of TargetingRules.
12 13 14 15 |
# File 'lib/openx/targeting_rules.rb', line 12 def initialize(&block) super([]) block.call(self) end |
Instance Method Details
#[](key) ⇒ Object
17 18 19 20 21 |
# File 'lib/openx/targeting_rules.rb', line 17 def [](key) rule = TargetingRule.new(key) push(rule) rule end |