Class: ONIX::ONIX21::Territory
- Inherits:
-
Object
- Object
- ONIX::ONIX21::Territory
- Defined in:
- lib/onix/onix21.rb
Instance Attribute Summary collapse
-
#countries ⇒ Object
Returns the value of attribute countries.
Instance Method Summary collapse
- #+(v) ⇒ Object
- #-(v) ⇒ Object
-
#initialize(countries) ⇒ Territory
constructor
A new instance of Territory.
Constructor Details
#initialize(countries) ⇒ Territory
Returns a new instance of Territory.
138 139 140 |
# File 'lib/onix/onix21.rb', line 138 def initialize(countries) @countries=countries end |
Instance Attribute Details
#countries ⇒ Object
Returns the value of attribute countries.
136 137 138 |
# File 'lib/onix/onix21.rb', line 136 def countries @countries end |
Instance Method Details
#+(v) ⇒ Object
142 143 144 |
# File 'lib/onix/onix21.rb', line 142 def +v Territory.new((@countries + v.countries).uniq) end |
#-(v) ⇒ Object
146 147 148 |
# File 'lib/onix/onix21.rb', line 146 def -v Territory.new((@countries - v.countries).uniq) end |