Class: Gh::Trending::Parsers::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/gh_trending/parsers/parser.rb

Overview

Abstract parser of the trending page.

Direct Known Subclasses

DevelopersParser, ReposParser

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(agent = nil) ⇒ Parser

Returns a new instance of Parser.



10
11
12
# File 'lib/gh_trending/parsers/parser.rb', line 10

def initialize(agent = nil)
  @agent = agent || default_agent
end

Instance Attribute Details

#agentObject (readonly)

Returns the value of attribute agent.



8
9
10
# File 'lib/gh_trending/parsers/parser.rb', line 8

def agent
  @agent
end

Instance Method Details

#parseObject

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/gh_trending/parsers/parser.rb', line 14

def parse
  raise NotImplementedError
end