Class: TFS::AreaPaths

Inherits:
Queryable show all
Defined in:
lib/tfs/area_paths.rb

Constant Summary

Constants inherited from Queryable

Queryable::RecordNotFound

Constants included from ClassHelpers

ClassHelpers::SPECIAL_CASES

Class Method Summary collapse

Methods inherited from Queryable

all, inherited, odata_query

Methods included from ClassHelpers

#base_class, #method_name_from_class, #odata_class_from_method_name

Class Method Details

.find(area_path) ⇒ Object

Changeset can be found by id alone

TFS::AreaPaths.find("area-path")


8
9
10
11
12
13
14
# File 'lib/tfs/area_paths.rb', line 8

def find(area_path)
  begin
    TFS.areapaths(area_path).run.first
  rescue RestClient::ResourceNotFound => e
    raise Queryable::RecordNotFound, "No record found for '#{area_path}'"
  end
end