Class: Biomart::Attribute

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

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject (readonly)

Returns the value of attribute display_name.



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

def display_name
  @display_name
end

#nameObject (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.

Returns:

  • (Boolean)

    true/false



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.

Returns:

  • (Boolean)

    true/false



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

def hidden?
  @hidden
end