Method: CF::Station#delete
- Defined in:
- lib/cf/station.rb
#delete ⇒ Object
Deletes a station
-
We need to pass line object with which desired station associated with as an argument to delete a station
Usage example for delete method
line = CF::Line.new("Digitize", "Department_name")
station = CF::Station.new({:type => "Work"})
line.stations station
line.stations.first.delete
315 316 317 318 319 |
# File 'lib/cf/station.rb', line 315 def delete resp = self.class.delete("/lines/#{CF.account_name}/#{self.line_title.downcase}/stations/#{self.index}.json") self.errors = resp.error. if resp.code != 200 return resp end |