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.



50
51
52
# File 'lib/nem/model/node.rb', line 50

def endpoint
  @endpoint
end

#identityObject (readonly)

Returns the value of attribute identity.



50
51
52
# File 'lib/nem/model/node.rb', line 50

def identity
  @identity
end

#metadataObject (readonly)

Returns the value of attribute metadata.



50
51
52
# File 'lib/nem/model/node.rb', line 50

def 
  @metadata
end

Class Method Details

.new_from_node(hash) ⇒ Object



54
55
56
57
58
59
60
# File 'lib/nem/model/node.rb', line 54

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