Class: Factual::Write::Submit

Inherits:
Base
  • Object
show all
Defined in:
lib/factual/write/submit.rb

Constant Summary collapse

VALID_KEYS =
[
  :table, :user,
  :factual_id, :values,
  :comment, :reference
]

Instance Method Summary collapse

Methods inherited from Base

#body, #write

Constructor Details

#initialize(api, params) ⇒ Submit

Returns a new instance of Submit.



10
11
12
13
# File 'lib/factual/write/submit.rb', line 10

def initialize(api, params)
  validate_params(params)
  super(api, params)
end

Instance Method Details

#pathObject



21
22
23
24
25
26
27
# File 'lib/factual/write/submit.rb', line 21

def path
  if @params[:factual_id]
    "/t/#{@params[:table]}/#{@params[:factual_id]}/submit"
  else
    "/t/#{@params[:table]}/submit"
  end
end