Class: Machinery::SystemFile
Instance Attribute Summary
Attributes inherited from Object
#attributes, #scope
Instance Method Summary
collapse
Methods inherited from Object
#==, #[], #[]=, #as_json, #compare_with, convert_element, convert_raw_hash, #empty?, from_json, has_property, #hash, #initialize, #initialize_copy, #method_missing, #respond_to?, #set_attributes
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Machinery::Object
Instance Method Details
#binary? ⇒ Boolean
50
51
52
53
|
# File 'lib/system_file.rb', line 50
def binary?
assert_scope
scope.binary?(self)
end
|
55
56
57
58
|
# File 'lib/system_file.rb', line 55
def content
assert_scope
scope.file_content(self)
end
|
#deleted? ⇒ Boolean
36
37
38
39
40
41
42
|
# File 'lib/system_file.rb', line 36
def deleted?
if changes && changes.include?("deleted")
true
else
false
end
end
|
#directory? ⇒ Boolean
28
29
30
|
# File 'lib/system_file.rb', line 28
def directory?
type == "dir"
end
|
#file? ⇒ Boolean
20
21
22
|
# File 'lib/system_file.rb', line 20
def file?
type == "file"
end
|
#link? ⇒ Boolean
24
25
26
|
# File 'lib/system_file.rb', line 24
def link?
type == "link"
end
|
#on_disk? ⇒ Boolean
44
45
46
47
48
|
# File 'lib/system_file.rb', line 44
def on_disk?
assert_scope
scope. && file? && !deleted?
end
|
#remote_directory? ⇒ Boolean
32
33
34
|
# File 'lib/system_file.rb', line 32
def remote_directory?
type == "remote_dir"
end
|