Class: Dice::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/dice/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Result

Returns a new instance of Result.



5
6
7
8
9
10
11
# File 'lib/dice/result.rb', line 5

def initialize(attrs = {})
  self.url = attrs[:data]['detailUrl']
  self.title = attrs[:data]['jobTitle']
  self.company = attrs[:data]['company']
  self.location = attrs[:data]['location']
  self.date = attrs[:data]['date']
end

Instance Attribute Details

#companyObject

Returns the value of attribute company.



3
4
5
# File 'lib/dice/result.rb', line 3

def company
  @company
end

#dateObject

Returns the value of attribute date.



3
4
5
# File 'lib/dice/result.rb', line 3

def date
  @date
end

#locationObject

Returns the value of attribute location.



3
4
5
# File 'lib/dice/result.rb', line 3

def location
  @location
end

#titleObject

Returns the value of attribute title.



3
4
5
# File 'lib/dice/result.rb', line 3

def title
  @title
end

#urlObject

Returns the value of attribute url.



3
4
5
# File 'lib/dice/result.rb', line 3

def url
  @url
end