Class: DaggerRuby::File
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
7
8
9
|
# File 'lib/dagger_ruby/file.rb', line 7
def self.root_field_name
"file"
end
|
Instance Method Details
#chown(owner) ⇒ Object
34
35
36
|
# File 'lib/dagger_ruby/file.rb', line 34
def chown(owner)
chain_operation("chown", { "owner" => owner })
end
|
#contents(offset_lines: nil, limit_lines: nil) ⇒ Object
19
20
21
22
23
24
|
# File 'lib/dagger_ruby/file.rb', line 19
def contents(offset_lines: nil, limit_lines: nil)
args = {}
args["offsetLines"] = offset_lines if offset_lines
args["limitLines"] = limit_lines if limit_lines
get_scalar("contents", args)
end
|
#export(path, opts = {}) ⇒ Object
45
46
47
48
49
50
|
# File 'lib/dagger_ruby/file.rb', line 45
def export(path, opts = {})
args = { "path" => path }
args["allowParentDirPath"] = opts[:allow_parent_dir_path] if opts.key?(:allow_parent_dir_path)
get_scalar("export", args)
end
|
#name ⇒ Object
30
31
32
|
# File 'lib/dagger_ruby/file.rb', line 30
def name
get_scalar("name")
end
|
#size ⇒ Object
26
27
28
|
# File 'lib/dagger_ruby/file.rb', line 26
def size
get_scalar("size")
end
|
#sync ⇒ Object
52
53
54
55
|
# File 'lib/dagger_ruby/file.rb', line 52
def sync
get_scalar("id")
self
end
|
#with_name(name) ⇒ Object
11
12
13
|
# File 'lib/dagger_ruby/file.rb', line 11
def with_name(name)
chain_operation("withName", { "name" => name })
end
|
#with_replaced(search, replacement, opts = {}) ⇒ Object
38
39
40
41
42
43
|
# File 'lib/dagger_ruby/file.rb', line 38
def with_replaced(search, replacement, opts = {})
args = { "search" => search, "replacement" => replacement }
args["all"] = opts[:all] if opts.key?(:all)
args["firstFrom"] = opts[:first_from] if opts[:first_from]
chain_operation("withReplaced", args)
end
|
#with_timestamps(timestamp) ⇒ Object
15
16
17
|
# File 'lib/dagger_ruby/file.rb', line 15
def with_timestamps(timestamp)
chain_operation("withTimestamps", { "timestamp" => timestamp })
end
|