Class: Tsclient::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/tsclient/node.rb

Class Method Summary collapse

Class Method Details

.from(data) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/tsclient/node.rb', line 7

def self.from(data)
  with(
    name: data.dig("Node", "Name"),
    computed_name: data.dig("Node", "ComputedName"),
    hostname: data.dig("Node", "Hostinfo", "Hostname"),
  )
end