Class: Cheri::Explorer::SearchArgs

Inherits:
Object
  • Object
show all
Defined in:
lib/cheri/explorer/explorer.rb

Overview

NameTypeValue

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(clazz, vars = nil, any = nil) ⇒ SearchArgs

Returns a new instance of SearchArgs.

Raises:

  • (ArgumentError)


238
239
240
241
242
243
244
245
246
247
248
249
250
251
# File 'lib/cheri/explorer/explorer.rb', line 238

def initialize(clazz,vars=nil,any=nil)
  raise Cheri.type_error(clazz,String) unless String === clazz
  raise ArgumentError,"Invalid class "+ clazz unless /^([A-Z])((\w|::[A-Z])*)$/.match clazz
  @z = clazz
  if vars
    raise Cheri.type_error(vars,Array) unless Array === vars
    vars.each do |v|
      raise Cheri.type_error(v,SearchNameValue) unless SearchNameValue === v
      raise Cheri.type_error(v.name,Symbol) if v.name && !(Symbol === v.name)
    end
    @v = vars
    @a = !(any == nil || any == false)
  end
end

Instance Attribute Details

#gcObject

Returns the value of attribute gc.



237
238
239
# File 'lib/cheri/explorer/explorer.rb', line 237

def gc
  @gc
end

Instance Method Details

#anyObject



261
262
263
# File 'lib/cheri/explorer/explorer.rb', line 261

def any
  @a  
end

#clazzObject



253
254
255
# File 'lib/cheri/explorer/explorer.rb', line 253

def clazz
  @z  
end

#varsObject



257
258
259
# File 'lib/cheri/explorer/explorer.rb', line 257

def vars
  @v  
end