class SDM::Postgres
Attributes
database[RW]
healthy[RW]
True if the datasource is reachable and the credentials are valid.
hostname[RW]
id[RW]
Unique identifier of the Resource.
name[RW]
Unique human-readable name of the Resource.
override_database[RW]
password[RW]
port[RW]
port_override[RW]
username[RW]
Public Class Methods
new( id:nil \ , name:nil \ , healthy:nil \ , tags:nil \ , hostname:nil \ , username:nil \ , password:nil \ , database:nil \ , port_override:nil \ , port:nil \ , override_database:nil \ )
click to toggle source
# File lib/models/porcelain.rb, line 3183 def initialize( id:nil \ , name:nil \ , healthy:nil \ , tags:nil \ , hostname:nil \ , username:nil \ , password:nil \ , database:nil \ , port_override:nil \ , port:nil \ , override_database:nil \ ) if id != nil @id = id end if name != nil @name = name end if healthy != nil @healthy = healthy end if tags != nil @tags = tags end if hostname != nil @hostname = hostname end if username != nil @username = username end if password != nil @password = password end if database != nil @database = database end if port_override != nil @port_override = port_override end if port != nil @port = port end if override_database != nil @override_database = override_database end end
Public Instance Methods
to_json(options={})
click to toggle source
# File lib/models/porcelain.rb, line 3240 def to_json(options={}) hash = {} self.instance_variables.each do |var| hash[var.id2name.delete_prefix('@')] = self.instance_variable_get var end hash.to_json end