Class: Posgra::Exporter
- Inherits:
-
Object
- Object
- Posgra::Exporter
- Defined in:
- lib/posgra/exporter.rb
Class Method Summary collapse
- .export_databases(driver, options = {}) ⇒ Object
- .export_grants(driver, options = {}) ⇒ Object
- .export_roles(driver, options = {}) ⇒ Object
Instance Method Summary collapse
- #export_databases ⇒ Object
- #export_grants ⇒ Object
- #export_roles ⇒ Object
-
#initialize(driver, options = {}) ⇒ Exporter
constructor
A new instance of Exporter.
Constructor Details
#initialize(driver, options = {}) ⇒ Exporter
Returns a new instance of Exporter.
14 15 16 17 |
# File 'lib/posgra/exporter.rb', line 14 def initialize(driver, = {}) @driver = driver @options = end |
Class Method Details
.export_databases(driver, options = {}) ⇒ Object
10 11 12 |
# File 'lib/posgra/exporter.rb', line 10 def self.export_databases(driver, = {}) self.new(driver, ).export_databases end |
.export_grants(driver, options = {}) ⇒ Object
6 7 8 |
# File 'lib/posgra/exporter.rb', line 6 def self.export_grants(driver, = {}) self.new(driver, ).export_grants end |
.export_roles(driver, options = {}) ⇒ Object
2 3 4 |
# File 'lib/posgra/exporter.rb', line 2 def self.export_roles(driver, = {}) self.new(driver, ).export_roles end |
Instance Method Details
#export_databases ⇒ Object
30 31 32 |
# File 'lib/posgra/exporter.rb', line 30 def export_databases @driver.describe_databases end |
#export_grants ⇒ Object
26 27 28 |
# File 'lib/posgra/exporter.rb', line 26 def export_grants @driver.describe_grants end |
#export_roles ⇒ Object
19 20 21 22 23 24 |
# File 'lib/posgra/exporter.rb', line 19 def export_roles { :users => @driver.describe_users.keys, :users_by_group => @driver.describe_groups, } end |