Class: Biomart::Attribute
- Inherits:
-
Object
- Object
- Biomart::Attribute
- Defined in:
- lib/biomart/attribute.rb
Overview
Class representation for a biomart attribute. Will belong to a Biomart::Dataset.
Instance Attribute Summary collapse
-
#display_name ⇒ Object
readonly
Returns the value of attribute display_name.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#default? ⇒ Boolean
Convenience method to see if this attribute would be enabled by default in the standard MartView interface.
-
#hidden? ⇒ Boolean
Convenience method to see if this attribute is hidden from the standard MartView interface.
-
#initialize(args) ⇒ Attribute
constructor
A new instance of Attribute.
Constructor Details
#initialize(args) ⇒ Attribute
Returns a new instance of Attribute.
7 8 9 10 11 12 |
# File 'lib/biomart/attribute.rb', line 7 def initialize(args) @name = args["internalName"] @display_name = args["displayName"] @default = args["default"] ? true : false @hidden = args["hideDisplay"] ? true : false end |
Instance Attribute Details
#display_name ⇒ Object (readonly)
Returns the value of attribute display_name.
5 6 7 |
# File 'lib/biomart/attribute.rb', line 5 def display_name @display_name end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/biomart/attribute.rb', line 5 def name @name end |
Instance Method Details
#default? ⇒ Boolean
Convenience method to see if this attribute would be enabled by default in the standard MartView interface.
26 27 28 |
# File 'lib/biomart/attribute.rb', line 26 def default? @default end |
#hidden? ⇒ Boolean
Convenience method to see if this attribute is hidden from the standard MartView interface.
18 19 20 |
# File 'lib/biomart/attribute.rb', line 18 def hidden? @hidden end |