Class: SDM::Memcached
- Inherits:
-
Object
- Object
- SDM::Memcached
- 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.
-
#port ⇒ Object
Returns the value of attribute port.
-
#port_override ⇒ Object
Returns the value of attribute port_override.
Instance Method Summary collapse
-
#initialize(id: nil, name: nil, healthy: nil, hostname: nil, port_override: nil, port: nil) ⇒ Memcached
constructor
A new instance of Memcached.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(id: nil, name: nil, healthy: nil, hostname: nil, port_override: nil, port: nil) ⇒ Memcached
Returns a new instance of Memcached.
1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 |
# File 'lib/models/porcelain.rb', line 1831 def initialize( id: nil, name: nil, healthy: nil, hostname: nil, port_override: 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 port != nil @port = port end end |
Instance Attribute Details
#healthy ⇒ Object
True if the datasource is reachable and the credentials are valid.
1823 1824 1825 |
# File 'lib/models/porcelain.rb', line 1823 def healthy @healthy end |
#hostname ⇒ Object
Returns the value of attribute hostname.
1825 1826 1827 |
# File 'lib/models/porcelain.rb', line 1825 def hostname @hostname end |
#id ⇒ Object
Unique identifier of the Resource.
1819 1820 1821 |
# File 'lib/models/porcelain.rb', line 1819 def id @id end |
#name ⇒ Object
Unique human-readable name of the Resource.
1821 1822 1823 |
# File 'lib/models/porcelain.rb', line 1821 def name @name end |
#port ⇒ Object
Returns the value of attribute port.
1829 1830 1831 |
# File 'lib/models/porcelain.rb', line 1829 def port @port end |
#port_override ⇒ Object
Returns the value of attribute port_override.
1827 1828 1829 |
# File 'lib/models/porcelain.rb', line 1827 def port_override @port_override end |
Instance Method Details
#to_json(options = {}) ⇒ Object
1859 1860 1861 1862 1863 1864 1865 |
# File 'lib/models/porcelain.rb', line 1859 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 |