Module: Ghaki::Account::DB_Port

Extended by:
SynOpts
Included in:
Database
Defined in:
lib/ghaki/account/db_port.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from SynOpts

attr_syn_opts

Instance Attribute Details

#db_portObject

Returns the value of attribute db_port.



11
12
13
# File 'lib/ghaki/account/db_port.rb', line 11

def db_port
  @db_port
end

Instance Method Details

#valid_db_port?Boolean


Returns:

  • (Boolean)


14
15
16
17
18
# File 'lib/ghaki/account/db_port.rb', line 14

def valid_db_port?
  return true if @db_port.nil?
  return true if @db_port.to_s =~ %r{\A\d+\z}o
  return false
end