Class: CrowdFlower::Judgment

Inherits:
Object
  • Object
show all
Includes:
Defaults
Defined in:
lib/ruby-crowdflower/judgment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Defaults

included

Constructor Details

#initialize(job) ⇒ Judgment

Returns a new instance of Judgment.



6
7
8
9
10
# File 'lib/ruby-crowdflower/judgment.rb', line 6

def initialize(job)
  @job = job
  Judgment.base_uri CrowdFlower.with_domain("/jobs/#{@job.id}/judgments")
  Judgment.default_params CrowdFlower.key
end

Instance Attribute Details

#jobObject (readonly)

Returns the value of attribute job.



4
5
6
# File 'lib/ruby-crowdflower/judgment.rb', line 4

def job
  @job
end

Instance Method Details

#all(page = 1, limit = 1000) ⇒ Object

Pull every judgment



13
14
15
# File 'lib/ruby-crowdflower/judgment.rb', line 13

def all(page = 1, limit = 1000)#full = true
  Judgment.get("", {:query => {:limit => limit, :page => page}})
end

#get(id) ⇒ Object



17
18
19
# File 'lib/ruby-crowdflower/judgment.rb', line 17

def get(id)
  Judgment.get("/#{id}")
end