Class: DaggerRuby::Host
Instance Attribute Summary
Attributes inherited from DaggerObject
#client, #query_builder
Class Method Summary
collapse
Instance Method Summary
collapse
#chain_operation, #id, #initialize
Class Method Details
.from_id(id, client) ⇒ Object
8
9
10
11
12
|
# File 'lib/dagger_ruby/host.rb', line 8
def self.from_id(id, client)
query = QueryBuilder.new("host")
query.load_from_id(id)
new(query, client)
end
|
.root_field_name ⇒ Object
14
15
16
|
# File 'lib/dagger_ruby/host.rb', line 14
def self.root_field_name
"host"
end
|
Instance Method Details
#directory(path, opts = {}) ⇒ Object
18
19
20
21
22
23
24
|
# File 'lib/dagger_ruby/host.rb', line 18
def directory(path, opts = {})
args = { "path" => path }
args["exclude"] = opts[:exclude] if opts[:exclude]
args["include"] = opts[:include] if opts[:include]
get_object("directory", Directory, args)
end
|
#file(path) ⇒ Object
26
27
28
|
# File 'lib/dagger_ruby/host.rb', line 26
def file(path)
get_object("file", File, { "path" => path })
end
|
#sync ⇒ Object
38
39
40
41
|
# File 'lib/dagger_ruby/host.rb', line 38
def sync
get_scalar("id")
self
end
|
#unix_socket(path) ⇒ Object
30
31
32
|
# File 'lib/dagger_ruby/host.rb', line 30
def unix_socket(path)
get_object("unixSocket", Socket, { "path" => path })
end
|
#workdir ⇒ Object
34
35
36
|
# File 'lib/dagger_ruby/host.rb', line 34
def workdir
get_scalar("workdir")
end
|