Class: Biomart::Filter
- Inherits:
-
Object
- Object
- Biomart::Filter
- Defined in:
- lib/biomart/filter.rb
Overview
Class representation for a biomart filter. Will belong to a Biomart::Dataset.
Instance Attribute Summary collapse
-
#default_value ⇒ Object
readonly
Returns the value of attribute default_value.
-
#display_name ⇒ Object
readonly
Returns the value of attribute display_name.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#pointer_dataset ⇒ Object
readonly
Returns the value of attribute pointer_dataset.
-
#pointer_filter ⇒ Object
readonly
Returns the value of attribute pointer_filter.
-
#qualifier ⇒ Object
readonly
Returns the value of attribute qualifier.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#default? ⇒ Boolean
Convenience method to see if this filter would be enabled by default in the standard MartView interface.
-
#hidden? ⇒ Boolean
Convenience method to see if this filter is hidden from the standard MartView interface.
-
#initialize(args) ⇒ Filter
constructor
A new instance of Filter.
-
#multiple_values? ⇒ Boolean
Convenience method to see if this filter allows multiple values to be passed to it.
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_value ⇒ Object (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_name ⇒ Object (readonly)
Returns the value of attribute display_name.
5 6 7 |
# File 'lib/biomart/filter.rb', line 5 def display_name @display_name end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/biomart/filter.rb', line 5 def name @name end |
#pointer_dataset ⇒ Object (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_filter ⇒ Object (readonly)
Returns the value of attribute pointer_filter.
5 6 7 |
# File 'lib/biomart/filter.rb', line 5 def pointer_filter @pointer_filter end |
#qualifier ⇒ Object (readonly)
Returns the value of attribute qualifier.
5 6 7 |
# File 'lib/biomart/filter.rb', line 5 def qualifier @qualifier end |
#type ⇒ Object (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.
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.
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.
44 45 46 |
# File 'lib/biomart/filter.rb', line 44 def multiple_values? @multiple_values end |