Class: SDM::Druid
- Inherits:
-
Object
- Object
- SDM::Druid
- Defined in:
- lib/models/porcelain.rb
Instance Attribute Summary collapse
-
#healthy ⇒ Object
True if the datasource is reachable and the credentials are valid.
-
#hostname ⇒ Object
Returns the value of attribute hostname.
-
#id ⇒ Object
Unique identifier of the Resource.
-
#name ⇒ Object
Unique human-readable name of the Resource.
-
#password ⇒ Object
Returns the value of attribute password.
-
#port ⇒ Object
Returns the value of attribute port.
-
#port_override ⇒ Object
Returns the value of attribute port_override.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(id: nil, name: nil, healthy: nil, hostname: nil, port_override: nil, username: nil, password: nil, port: nil) ⇒ Druid
constructor
A new instance of Druid.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(id: nil, name: nil, healthy: nil, hostname: nil, port_override: nil, username: nil, password: nil, port: nil) ⇒ Druid
Returns a new instance of Druid.
848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 |
# File 'lib/models/porcelain.rb', line 848 def initialize( id: nil, name: nil, healthy: nil, hostname: nil, port_override: nil, username: nil, password: nil, port: nil ) if id != nil @id = id end if name != nil @name = name end if healthy != nil @healthy = healthy end if hostname != nil @hostname = hostname end if port_override != nil @port_override = port_override end if username != nil @username = username end if password != nil @password = password end if port != nil @port = port end end |
Instance Attribute Details
#healthy ⇒ Object
True if the datasource is reachable and the credentials are valid.
836 837 838 |
# File 'lib/models/porcelain.rb', line 836 def healthy @healthy end |
#hostname ⇒ Object
Returns the value of attribute hostname.
838 839 840 |
# File 'lib/models/porcelain.rb', line 838 def hostname @hostname end |
#id ⇒ Object
Unique identifier of the Resource.
832 833 834 |
# File 'lib/models/porcelain.rb', line 832 def id @id end |
#name ⇒ Object
Unique human-readable name of the Resource.
834 835 836 |
# File 'lib/models/porcelain.rb', line 834 def name @name end |
#password ⇒ Object
Returns the value of attribute password.
844 845 846 |
# File 'lib/models/porcelain.rb', line 844 def password @password end |
#port ⇒ Object
Returns the value of attribute port.
846 847 848 |
# File 'lib/models/porcelain.rb', line 846 def port @port end |
#port_override ⇒ Object
Returns the value of attribute port_override.
840 841 842 |
# File 'lib/models/porcelain.rb', line 840 def port_override @port_override end |
#username ⇒ Object
Returns the value of attribute username.
842 843 844 |
# File 'lib/models/porcelain.rb', line 842 def username @username end |
Instance Method Details
#to_json(options = {}) ⇒ Object
884 885 886 887 888 889 890 |
# File 'lib/models/porcelain.rb', line 884 def to_json( = {}) hash = {} self.instance_variables.each do |var| hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var end hash.to_json end |