Class: Nucleo::Models::PageRank

Inherits:
Object
  • Object
show all
Defined in:
lib/nucleo/models/page_rank.rb

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Nucleo::Models::PageRank

Returns an instance of the PageRank domain model

Parameters:

  • attributes (Hash) (defaults to: {})


9
10
11
# File 'lib/nucleo/models/page_rank.rb', line 9

def initialize(attributes={})
  @attributes = attributes
end

Instance Method Details

#rankInteger

Returns the numeric rank

Returns:

  • (Integer)


16
17
18
# File 'lib/nucleo/models/page_rank.rb', line 16

def rank
  @attributes['rank'].to_i
end

#rank_maxInteger

Returns the numeric rank max

Returns:

  • (Integer)


23
24
25
# File 'lib/nucleo/models/page_rank.rb', line 23

def rank_max
  @attributes['rank_max'].to_i
end