Class: Nem::Model::Importance

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Nem::Mixin::Assignable

#initialize

Instance Attribute Details

#addressObject

Returns the value of attribute address.



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

def address
  @address
end

#evObject

Returns the value of attribute ev.



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

def ev
  @ev
end

#heightObject

Returns the value of attribute height.



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

def height
  @height
end

#is_setObject

Returns the value of attribute is_set.



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

def is_set
  @is_set
end

#scoreObject

Returns the value of attribute score.



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

def score
  @score
end

Class Method Details

.new_from_account_importance_view_model(hash) ⇒ Object



12
13
14
15
16
17
18
19
20
21
# File 'lib/nem/model/importance.rb', line 12

def self.(hash)
  importance = hash[:importance]
  new(
    address: hash[:address],
    score: importance[:score],
    ev: importance[:ev],
    is_set: importance[:isSet],
    height: importance[:height]
  )
end

Instance Method Details

#set?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/nem/model/importance.rb', line 24

def set?
  @is_set == 1
end