Class: Biomart::Filter

Inherits:
Object
  • Object
show all
Defined in:
lib/biomart/filter.rb

Overview

Class representation for a biomart filter. Will belong to a Biomart::Dataset.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Filter

Returns a new instance of Filter.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/biomart/filter.rb', line 7

def initialize(args)
  @name            = args["internalName"]
  @display_name    = args["displayName"]
  @default         = args["defaultOn"] ? true : false
  @default_value   = args["defaultValue"]
  @hidden          = args["hideDisplay"] ? true : false
  @qualifier       = args["qualifier"]
  @type            = args["type"]
  @multiple_values = args["multipleValues"] ? true : false
  
  @pointer_dataset   = args["pointerDataset"]
  @pointer_filter    = args["pointerFilter"]
  @pointer_interface = args["pointerInterface"]
  
  @type.downcase! unless @type.nil?
end

Instance Attribute Details

#default_valueObject (readonly)

Returns the value of attribute default_value.



5
6
7
# File 'lib/biomart/filter.rb', line 5

def default_value
  @default_value
end

#display_nameObject (readonly)

Returns the value of attribute display_name.



5
6
7
# File 'lib/biomart/filter.rb', line 5

def display_name
  @display_name
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/biomart/filter.rb', line 5

def name
  @name
end

#pointer_datasetObject (readonly)

Returns the value of attribute pointer_dataset.



5
6
7
# File 'lib/biomart/filter.rb', line 5

def pointer_dataset
  @pointer_dataset
end

#pointer_filterObject (readonly)

Returns the value of attribute pointer_filter.



5
6
7
# File 'lib/biomart/filter.rb', line 5

def pointer_filter
  @pointer_filter
end

#qualifierObject (readonly)

Returns the value of attribute qualifier.



5
6
7
# File 'lib/biomart/filter.rb', line 5

def qualifier
  @qualifier
end

#typeObject (readonly)

Returns the value of attribute type.



5
6
7
# File 'lib/biomart/filter.rb', line 5

def type
  @type
end

Instance Method Details

#default?Boolean

Convenience method to see if this filter would be enabled by default in the standard MartView interface.

Returns:

  • (Boolean)

    true/false



36
37
38
# File 'lib/biomart/filter.rb', line 36

def default?
  @default
end

#hidden?Boolean

Convenience method to see if this filter is hidden from the standard MartView interface.

Returns:

  • (Boolean)

    true/false



28
29
30
# File 'lib/biomart/filter.rb', line 28

def hidden?
  @hidden
end

#multiple_values?Boolean

Convenience method to see if this filter allows multiple values to be passed to it.

Returns:

  • (Boolean)

    true/false



44
45
46
# File 'lib/biomart/filter.rb', line 44

def multiple_values?
  @multiple_values
end