Class: Holistics::Sources
Class Method Summary
collapse
Instance Method Summary
collapse
banner, subcommand_prefix
Constructor Details
#initialize(*args) ⇒ Sources
Returns a new instance of Sources.
Class Method Details
.help(*args) ⇒ Object
7
8
9
10
11
12
13
14
|
# File 'lib/holistics/sources.rb', line 7
def self.help(*args)
super
puts <<-INSTRUCTION
Examples:
holistics sources list # List all data sources
INSTRUCTION
end
|
Instance Method Details
#info(id) ⇒ Object
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/holistics/sources.rb', line 23
def info(id)
puts "`sources info #{id}` called with options: #{options}" if Holistics.debug?
item = @this.find(id)
puts "Source ID: " + item['id'].to_s.yellow
{
name: item['name'],
dbtype: item['dbtype'],
slug: item['slug'],
settings: item['settings']
}.each { |k, v| puts "\t" + [k,v].join(": ") }
end
|
#list ⇒ Object
17
18
19
20
|
# File 'lib/holistics/sources.rb', line 17
def list
puts "`sources list` called with options: #{options}" if Holistics.debug?
tp(@this.all)
end
|