Class: Posgra::Exporter
- Inherits:
-
Object
- Object
- Posgra::Exporter
- Defined in:
- lib/posgra/exporter.rb
Class Method Summary collapse
- .export_grants(driver, options = {}, &block) ⇒ Object
- .export_roles(driver, options = {}, &block) ⇒ Object
Instance Method Summary collapse
- #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.
10 11 12 13 |
# File 'lib/posgra/exporter.rb', line 10 def initialize(driver, = {}) @driver = driver @options = end |
Class Method Details
.export_grants(driver, options = {}, &block) ⇒ Object
6 7 8 |
# File 'lib/posgra/exporter.rb', line 6 def self.export_grants(driver, = {}, &block) self.new(driver, ).export_grants(&block) end |
.export_roles(driver, options = {}, &block) ⇒ Object
2 3 4 |
# File 'lib/posgra/exporter.rb', line 2 def self.export_roles(driver, = {}, &block) self.new(driver, ).export_roles(&block) end |
Instance Method Details
#export_grants ⇒ Object
22 23 24 |
# File 'lib/posgra/exporter.rb', line 22 def export_grants @driver.describe_grants end |
#export_roles ⇒ Object
15 16 17 18 19 20 |
# File 'lib/posgra/exporter.rb', line 15 def export_roles { :users => @driver.describe_users.keys, :users_by_group => @driver.describe_groups, } end |