Class: Kiba::Extend::Registry::FileRegistryEntry
Overview
Captures the data about an entry in the file registry
This is the underlying data that can be used to derive a registered
source, destination, or lookup file object.
Used instead of just passing around a Hash so that it can validate
itself and carry its own errors/warnings
Constant Summary
EntryValidatable::TYPES
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from Treeable
#ancestors, #diagram, #mermaid, #parents
#node_label
#summary
Constructor Details
Returns a new instance of FileRegistryEntry.
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/kiba/extend/registry/file_registry_entry.rb', line 26
def initialize(key, reghash)
@key = key
@type = :file
@creator = nil
@desc = ""
@dest_class = Kiba::Extend.destination
@dest_opt = nil
@dest_special_opts = nil
@lookup_on = nil
@path = nil
@src_class = Kiba::Extend.source
@src_opt = nil
@supplied = false
@tags = []
@valid = false
@errors = {}
@warnings = []
assign_values_from(reghash)
validate
end
|
Instance Attribute Details
#creator ⇒ Object
18
19
20
|
# File 'lib/kiba/extend/registry/file_registry_entry.rb', line 18
def creator
@creator
end
|
#desc ⇒ Object
18
19
20
|
# File 'lib/kiba/extend/registry/file_registry_entry.rb', line 18
def desc
@desc
end
|
#dest_class ⇒ Object
18
19
20
|
# File 'lib/kiba/extend/registry/file_registry_entry.rb', line 18
def dest_class
@dest_class
end
|
#dest_opt ⇒ Object
18
19
20
|
# File 'lib/kiba/extend/registry/file_registry_entry.rb', line 18
def dest_opt
@dest_opt
end
|
#dest_special_opts ⇒ Object
18
19
20
|
# File 'lib/kiba/extend/registry/file_registry_entry.rb', line 18
def dest_special_opts
@dest_special_opts
end
|
#errors ⇒ Object
18
19
20
|
# File 'lib/kiba/extend/registry/file_registry_entry.rb', line 18
def errors
@errors
end
|
#key ⇒ Object
18
19
20
|
# File 'lib/kiba/extend/registry/file_registry_entry.rb', line 18
def key
@key
end
|
#lookup_on ⇒ Object
18
19
20
|
# File 'lib/kiba/extend/registry/file_registry_entry.rb', line 18
def lookup_on
@lookup_on
end
|
#message ⇒ Object
18
19
20
|
# File 'lib/kiba/extend/registry/file_registry_entry.rb', line 18
def message
@message
end
|
#path ⇒ Object
18
19
20
|
# File 'lib/kiba/extend/registry/file_registry_entry.rb', line 18
def path
@path
end
|
#src_class ⇒ Object
18
19
20
|
# File 'lib/kiba/extend/registry/file_registry_entry.rb', line 18
def src_class
@src_class
end
|
#src_opt ⇒ Object
18
19
20
|
# File 'lib/kiba/extend/registry/file_registry_entry.rb', line 18
def src_opt
@src_opt
end
|
#supplied ⇒ Object
18
19
20
|
# File 'lib/kiba/extend/registry/file_registry_entry.rb', line 18
def supplied
@supplied
end
|
18
19
20
|
# File 'lib/kiba/extend/registry/file_registry_entry.rb', line 18
def tags
@tags
end
|
#type ⇒ Object
18
19
20
|
# File 'lib/kiba/extend/registry/file_registry_entry.rb', line 18
def type
@type
end
|
#warnings ⇒ Object
18
19
20
|
# File 'lib/kiba/extend/registry/file_registry_entry.rb', line 18
def warnings
@warnings
end
|
Instance Method Details
#dir ⇒ Object
47
|
# File 'lib/kiba/extend/registry/file_registry_entry.rb', line 47
def dir = path.dirname
|
#valid? ⇒ Boolean
Whether the Entry is valid
51
|
# File 'lib/kiba/extend/registry/file_registry_entry.rb', line 51
def valid? = @valid
|