Class: Consul::Data

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/consul/data.rb

Instance Method Summary collapse

Constructor Details

#initialize(response_hash) ⇒ Data

Returns a new instance of Data.



10
11
12
# File 'lib/consul/data.rb', line 10

def initialize(response_hash)
  @response = response_hash
end

Instance Method Details

#flagsObject



19
20
21
# File 'lib/consul/data.rb', line 19

def flags
  hash_map(__callee__)
end

#valueObject



14
15
16
17
# File 'lib/consul/data.rb', line 14

def value
  text = Base64.decode64(hash_map('Value'))
  try_decode(text)
end