Class: OperationSet

Inherits:
Object
  • Object
show all
Defined in:
lib/satops/operator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sat) ⇒ OperationSet

Returns a new instance of OperationSet.



200
201
202
203
# File 'lib/satops/operator.rb', line 200

def initialize(sat)
  @sat=sat
  @list=[]
end

Instance Attribute Details

#listObject (readonly)

Returns the value of attribute list.



198
199
200
# File 'lib/satops/operator.rb', line 198

def list
  @list
end

Instance Method Details

#-(val) ⇒ Object



232
233
234
235
236
237
238
# File 'lib/satops/operator.rb', line 232

def -(val)
  result=[]
  @list.each do |e|
    result << e unless val.include?(e)
  end
  result
end

#delete_allObject



211
212
213
214
215
# File 'lib/satops/operator.rb', line 211

def delete_all
  self.fetch_all.each do |obj|
    obj.delete(@sat)
  end
end

#extra(list) ⇒ Object



205
206
207
208
209
# File 'lib/satops/operator.rb', line 205

def extra(list)
  list.each do |obj|
    obj.delete(@sat)
  end
end

#fetchObject



217
218
219
# File 'lib/satops/operator.rb', line 217

def fetch
  @list=fetch_all
end