Method: Git::Base::Factory#object
- Defined in:
- lib/git/base/factory.rb
#object(objectish) ⇒ Object
returns a Git::Object of the appropriate type you can also call @git.gtree(‘tree’), but that’s just for readability. If you call @git.gtree(‘HEAD’) it will still return a Git::Object::Commit object.
on the objectish and determine the type of the object and return an appropriate object for that type
52 53 54 |
# File 'lib/git/base/factory.rb', line 52 def object(objectish) Git::Object.new(self, objectish) end |