parameters: (self)
return_statement: return self.has_prefix(project.path_to_example)
docstring: Returns `True` if the view's path is under the 'example' dir.
docstring_summary: Returns `True` if the view's path is under the 'example' dir.
docstring_tokens: Returns True if the view s path is under the example dir .
function: def is_example(self):
          '''Returns `True` if the view's path is under the 'example' dir.
          '''
          assert self.path, 'view has not been saved yet'
          project = PubPackage.from_path(self.path)
          if not (project and project.path_to_example):
              return False
          return self.has_prefix(project.path_to_example)
function_tokens: def is_example ( self ) : assert self . path , 'view has not been saved yet' project = PubPackage . from_path ( self . path ) if not ( project and project . path_to_example ) : return False return self . has_prefix ( project . path_to_example )