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.
-
#tags ⇒ Object
Tags is a map of key, value pairs.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(id: nil, name: nil, healthy: nil, tags: 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, tags: nil, hostname: nil, port_override: nil, username: nil, password: nil, port: nil) ⇒ Druid
Returns a new instance of Druid.
868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 |
# File 'lib/models/porcelain.rb', line 868 def initialize( id:nil \ , name:nil \ , healthy:nil \ , tags: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 != nil @tags = 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.
855 856 857 |
# File 'lib/models/porcelain.rb', line 855 def healthy @healthy end |
#hostname ⇒ Object
Returns the value of attribute hostname.
859 860 861 |
# File 'lib/models/porcelain.rb', line 859 def hostname @hostname end |
#id ⇒ Object
Unique identifier of the Resource.
851 852 853 |
# File 'lib/models/porcelain.rb', line 851 def id @id end |
#name ⇒ Object
Unique human-readable name of the Resource.
853 854 855 |
# File 'lib/models/porcelain.rb', line 853 def name @name end |
#password ⇒ Object
Returns the value of attribute password.
865 866 867 |
# File 'lib/models/porcelain.rb', line 865 def password @password end |
#port ⇒ Object
Returns the value of attribute port.
867 868 869 |
# File 'lib/models/porcelain.rb', line 867 def port @port end |
#port_override ⇒ Object
Returns the value of attribute port_override.
861 862 863 |
# File 'lib/models/porcelain.rb', line 861 def port_override @port_override end |
#tags ⇒ Object
Tags is a map of key, value pairs.
857 858 859 |
# File 'lib/models/porcelain.rb', line 857 def @tags end |
#username ⇒ Object
Returns the value of attribute username.
863 864 865 |
# File 'lib/models/porcelain.rb', line 863 def username @username end |
Instance Method Details
#to_json(options = {}) ⇒ Object
915 916 917 918 919 920 921 |
# File 'lib/models/porcelain.rb', line 915 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 |