Class: Nem::Model::Harvest

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

Instance Attribute Summary collapse

Class Method Summary collapse

Methods included from Nem::Mixin::Assignable

#initialize

Instance Attribute Details

#difficultyObject (readonly)

Returns the value of attribute difficulty.



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

def difficulty
  @difficulty
end

#heightObject (readonly)

Returns the value of attribute height.



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

def height
  @height
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



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

def timestamp
  @timestamp
end

#total_feeObject (readonly)

Returns the value of attribute total_fee.



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

def total_fee
  @total_fee
end

Class Method Details

.new_from_harvest(hash) ⇒ Object



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

def self.new_from_harvest(hash)
  new(
    timestamp: hash[:timeStamp],
    difficulty: hash[:difficulty],
    total_fee: hash[:totalFee],
    id: hash[:id],
    height: hash[:height]
  )
end