Class: Nem::Model::Namespace

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

Instance Attribute Summary collapse

Class Method Summary collapse

Methods included from Nem::Mixin::Assignable

#initialize

Instance Attribute Details

#fqnObject (readonly)

Returns the value of attribute fqn.



6
7
8
# File 'lib/nem/model/namespace.rb', line 6

def fqn
  @fqn
end

#heightObject (readonly)

Returns the value of attribute height.



6
7
8
# File 'lib/nem/model/namespace.rb', line 6

def height
  @height
end

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/nem/model/namespace.rb', line 6

def id
  @id
end

#ownerObject (readonly)

Returns the value of attribute owner.



6
7
8
# File 'lib/nem/model/namespace.rb', line 6

def owner
  @owner
end

Class Method Details

.new_from_namespace(hash) ⇒ Object



19
20
21
# File 'lib/nem/model/namespace.rb', line 19

def self.new_from_namespace(hash)
  new(hash)
end

.new_from_namespace_meta_data_pair(hash) ⇒ Object



8
9
10
11
12
13
14
15
16
17
# File 'lib/nem/model/namespace.rb', line 8

def self.(hash)
  meta = hash[:meta]
  ns = hash[:namespace]
  new(
    id: meta[:id],
    fqn: ns[:fqn],
    owner: ns[:owner],
    height: ns[:height]
  )
end