Class: PageStats

Inherits:
Object
  • Object
show all
Defined in:
lib/contentar/page_stats.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ PageStats

Returns a new instance of PageStats.



4
5
6
# File 'lib/contentar/page_stats.rb', line 4

def initialize(url)
  @url = url
end

Instance Attribute Details

#urlObject (readonly)

Returns the value of attribute url.



3
4
5
# File 'lib/contentar/page_stats.rb', line 3

def url
  @url
end

Instance Method Details

#dataObject



8
9
10
11
12
13
# File 'lib/contentar/page_stats.rb', line 8

def data
  social_data.
    merge(reading_level_data).
    merge(article_data).
    merge(word_count_data)
end