Class: Bioroebe::Biomart::Filter

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

Overview

Bioroebe::Biomart::Filter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Filter

#

initialize

#


25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/bioroebe/biomart/filter.rb', line 25

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.



18
19
20
# File 'lib/bioroebe/biomart/filter.rb', line 18

def default_value
  @default_value
end

#display_nameObject (readonly)

Returns the value of attribute display_name.



17
18
19
# File 'lib/bioroebe/biomart/filter.rb', line 17

def display_name
  @display_name
end

#pointer_datasetObject (readonly)

Returns the value of attribute pointer_dataset.



19
20
21
# File 'lib/bioroebe/biomart/filter.rb', line 19

def pointer_dataset
  @pointer_dataset
end

#pointer_filterObject (readonly)

Returns the value of attribute pointer_filter.



20
21
22
# File 'lib/bioroebe/biomart/filter.rb', line 20

def pointer_filter
  @pointer_filter
end

Instance Method Details

#default?Boolean

#

default?

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

#

Returns:

  • (Boolean)

    true/false



67
68
69
# File 'lib/bioroebe/biomart/filter.rb', line 67

def default?
  @default
end

#hidden?Boolean Also known as: hidden

#

hidden?

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

#

Returns:

  • (Boolean)

    true/false



48
49
50
# File 'lib/bioroebe/biomart/filter.rb', line 48

def hidden?
  @hidden
end

#multiple_values?Boolean Also known as: multiple_values

#

multiple_values?

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

#

Returns:

  • (Boolean)

    true/false



86
87
88
# File 'lib/bioroebe/biomart/filter.rb', line 86

def multiple_values?
  @multiple_values
end

#name?Boolean Also known as: name

#

name?

#

Returns:

  • (Boolean)


74
75
76
# File 'lib/bioroebe/biomart/filter.rb', line 74

def name?
  @name
end

#qualifier?Boolean Also known as: qualifier

#

qualifier?

#

Returns:

  • (Boolean)


93
94
95
# File 'lib/bioroebe/biomart/filter.rb', line 93

def qualifier?
  @qualifier
end

#type?Boolean Also known as: type

#

type?

#

Returns:

  • (Boolean)


55
56
57
# File 'lib/bioroebe/biomart/filter.rb', line 55

def type?
  @type
end