Class: PgCtrl::User

Inherits:
RDBMSObject show all
Defined in:
lib/pg_ctrl/db.rb

Instance Attribute Summary

Attributes inherited from RDBMSObject

#name, #oid, #owner, #rdbms

Instance Method Summary collapse

Methods inherited from RDBMSObject

#to_s

Methods included from Utils

#set_opts

Constructor Details

#initialize(rdbms, oid, name, opts = {}) ⇒ User

Returns a new instance of User.



22
23
24
25
26
# File 'lib/pg_ctrl/db.rb', line 22

def initialize(rdbms, oid, name, opts = {})
  super(rdbms, oid, name, self)
  set_opts(opts, :is_superuser, :can_create_db, :can_create_role, 
      :can_login)
end

Instance Method Details

#can_create_db?Boolean

Returns:

  • (Boolean)


19
# File 'lib/pg_ctrl/db.rb', line 19

def can_create_db?() @can_create_db end

#can_create_role?Boolean

Returns:

  • (Boolean)


20
# File 'lib/pg_ctrl/db.rb', line 20

def can_create_role?() @can_create_role end

#can_login?Boolean

Returns:

  • (Boolean)


21
# File 'lib/pg_ctrl/db.rb', line 21

def can_login?() @can_login end

#superuser?Boolean

Returns:

  • (Boolean)


18
# File 'lib/pg_ctrl/db.rb', line 18

def superuser?() @is_superuser end