Class: DaggerRuby::GitRef
Instance Attribute Summary
Attributes inherited from DaggerObject
#client, #query_builder
Class Method Summary
collapse
Instance Method Summary
collapse
#chain_operation, from_id, #id, #initialize
Class Method Details
.root_field_name ⇒ Object
46
47
48
|
# File 'lib/dagger_ruby/git_repository.rb', line 46
def self.root_field_name
"gitRef"
end
|
Instance Method Details
#commit ⇒ Object
50
51
52
|
# File 'lib/dagger_ruby/git_repository.rb', line 50
def commit
get_scalar("commit")
end
|
#ref ⇒ Object
54
55
56
|
# File 'lib/dagger_ruby/git_repository.rb', line 54
def ref
get_scalar("ref")
end
|
#sync ⇒ Object
70
71
72
73
|
# File 'lib/dagger_ruby/git_repository.rb', line 70
def sync
get_scalar("id")
self
end
|
#tree(opts = {}) ⇒ Object
58
59
60
61
62
63
64
65
66
67
68
|
# File 'lib/dagger_ruby/git_repository.rb', line 58
def tree(opts = {})
args = {}
args["discardGitDir"] = opts[:discard_git_dir] if opts.key?(:discard_git_dir)
args["depth"] = opts[:depth] if opts[:depth]
args["includeTags"] = opts[:include_tags] if opts.key?(:include_tags)
directory = get_object("tree", Directory, args)
directory = directory.directory(opts[:path]) if opts[:path]
directory = directory.filter(exclude: opts[:exclude], include: opts[:include]) if opts[:exclude] || opts[:include]
directory
end
|