Class: Bioroebe::Biomart::Database
- Inherits:
-
Object
- Object
- Bioroebe::Biomart::Database
show all
- Includes:
- Bioroebe::Biomart
- Defined in:
- lib/bioroebe/biomart/database.rb
Overview
Bioroebe::Biomart::Dataset
Instance Method Summary
collapse
#request
Constructor Details
#initialize(url, args) ⇒ Database
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/bioroebe/biomart/database.rb', line 23
def initialize( url, args )
@url = url or raise ArgumentError, 'must pass :url'
unless @url =~ /martservice/
@url = @url+'/martservice'
end
@name = args['name'] || args[:name]
@display_name = args['displayName'] || args[:display_name]
@visible = ( args['visible'] || args[:visible] ) ? true : false
reset
end
|
Instance Method Details
#datasets? ⇒ Hash
Also known as:
datasets
#
datasets?
Returns a hash (keyed by the biomart 'name' for the dataset) of all of the Biomart::Dataset objects belonging to this server.
#
78
79
80
81
82
83
|
# File 'lib/bioroebe/biomart/database.rb', line 78
def datasets?
if @datasets.empty?
fetch_datasets
end
return @datasets
end
|
#display_name? ⇒ Boolean
Also known as:
display_name
124
125
126
|
# File 'lib/bioroebe/biomart/database.rb', line 124
def display_name?
@display_name
end
|
#list_datasets ⇒ Array
#
list_datasets
Returns an array of the dataset names (biomart 'name') for this dataset.
#
56
57
58
59
60
61
|
# File 'lib/bioroebe/biomart/database.rb', line 56
def list_datasets
if @datasets.empty?
fetch_datasets
end
return @datasets.keys
end
|
#name? ⇒ Boolean
Also known as:
name
66
67
68
|
# File 'lib/bioroebe/biomart/database.rb', line 66
def name?
@name
end
|
#reset ⇒ Object
37
38
39
|
# File 'lib/bioroebe/biomart/database.rb', line 37
def reset
@datasets = {}
end
|
#visible ⇒ Boolean
46
47
48
|
# File 'lib/bioroebe/biomart/database.rb', line 46
def visible?
@visible
end
|
#visible? ⇒ Boolean
#
visible?
Returns true / false if this database is visbile in the default MartView interface.
#
44
45
46
|
# File 'lib/bioroebe/biomart/database.rb', line 44
def visible?
@visible
end
|