Class: Papercall::Fetcher

Inherits:
Object
  • Object
show all
Defined in:
lib/papercall/fetcher.rb

Overview

Superclass for fetchers. A fetcher fetches submissions of different categories and stores them in instance variables.

Direct Known Subclasses

FileFetcher, RestFetcher

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#acceptedObject (readonly)

Returns the value of attribute accepted.



5
6
7
# File 'lib/papercall/fetcher.rb', line 5

def accepted
  @accepted
end

#declinedObject (readonly)

Returns the value of attribute declined.



5
6
7
# File 'lib/papercall/fetcher.rb', line 5

def declined
  @declined
end

#rejectedObject (readonly)

Returns the value of attribute rejected.



5
6
7
# File 'lib/papercall/fetcher.rb', line 5

def rejected
  @rejected
end

#submittedObject (readonly)

Returns the value of attribute submitted.



5
6
7
# File 'lib/papercall/fetcher.rb', line 5

def 
  @submitted
end

#waitlistObject (readonly)

Returns the value of attribute waitlist.



5
6
7
# File 'lib/papercall/fetcher.rb', line 5

def waitlist
  @waitlist
end

Instance Method Details

#allObject



7
8
9
10
11
12
13
14
15
# File 'lib/papercall/fetcher.rb', line 7

def all
  {
    submitted: @submitted,
    accepted: @accepted,
    rejected: @rejected,
    waitlist: @waitlist,
    declined: @declined
  }
end

#analysisObject



17
18
19
20
21
22
23
24
# File 'lib/papercall/fetcher.rb', line 17

def analysis
  all = @submitted
  all += @accepted
  all += @rejected
  all += @waitlist
  all += @declined
  all
end