Class: Nem::Model::NodeIdentity

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

#nameObject (readonly)

Returns the value of attribute name.



37
38
39
# File 'lib/nem/model/node.rb', line 37

def name
  @name
end

#public_keyObject (readonly)

Returns the value of attribute public_key.



37
38
39
# File 'lib/nem/model/node.rb', line 37

def public_key
  @public_key
end

Class Method Details

.new_from_identity(hash) ⇒ Object



39
40
41
42
43
44
# File 'lib/nem/model/node.rb', line 39

def self.new_from_identity(hash)
  new(
    name: hash[:name],
    public_key: hash[:"public-key"]
  )
end