Class: CrowdFlower::Judgment
- Inherits:
-
Object
- Object
- CrowdFlower::Judgment
- Includes:
- Defaults
- Defined in:
- lib/ruby-crowdflower/judgment.rb
Instance Attribute Summary collapse
-
#job ⇒ Object
readonly
Returns the value of attribute job.
Instance Method Summary collapse
-
#all(page = 1, limit = 1000) ⇒ Object
Pull every judgment.
- #get(id) ⇒ Object
-
#initialize(job) ⇒ Judgment
constructor
A new instance of Judgment.
Methods included from Defaults
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
#job ⇒ Object (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 |