Class: Nem::Model::Node

Inherits:
Object
  • Object
show all
Includes:
Nem::Mixin::Assignable
Defined in:
lib/nem/model/node.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods included from Nem::Mixin::Assignable

#initialize

Instance Attribute Details

#endpointObject (readonly)

Returns the value of attribute endpoint.



28
29
30
# File 'lib/nem/model/node.rb', line 28

def endpoint
  @endpoint
end

#identityObject (readonly)

Returns the value of attribute identity.



28
29
30
# File 'lib/nem/model/node.rb', line 28

def identity
  @identity
end

#metadataObject (readonly)

Returns the value of attribute metadata.



28
29
30
# File 'lib/nem/model/node.rb', line 28

def 
  @metadata
end

Class Method Details

.new_from_node(hash) ⇒ Object



32
33
34
35
36
37
38
# File 'lib/nem/model/node.rb', line 32

def self.new_from_node(hash)
  new(
    metadata: NodeMetadata.new(hash[:metaData]),
    endpoint: NodeEndpoint.new(hash[:endpoint]),
    identity: NodeIdentity.new(hash[:identity])
  )
end