Class: Pikuri::Bundle::Base
- Inherits:
-
Data
- Object
- Data
- Pikuri::Bundle::Base
- Defined in:
- lib/pikuri/bundle/base.rb
Overview
One search base: a directory to scan, plus whether the bytes under it are the user's own.
Bundle::Base.new(dir: project_root, trusted: repo_sources_are_mine)
Bundle::Base.new(dir: Dir.home) # trusted: false
trusted asks what Pikuri::Workspace::Filesystem#trusted? asks for
the file tools — user-authored bytes, or bytes that arrived with a
clone? — but about this root alone. That is why it is a value the
host passes rather than a reach into the workspace: the two objects
reach different bytes, so a workspace whose readable: carries
~/.m2/repository is honestly untrusted while the project's own
.pikuri/skills beside it is honestly the user's. Like private:, it
is unverifiable, so silence buys false.
A scanner grades its own untrusted trifecta leg by unioning this flag over the bundles it actually stored, so an untrusted base costs nothing while it holds nothing.
Instance Attribute Summary collapse
-
#dir ⇒ Object
readonly
Returns the value of attribute dir.
-
#trusted ⇒ Object
readonly
Returns the value of attribute trusted.
Instance Method Summary collapse
- #initialize(dir:, trusted: false) ⇒ Base constructor
Constructor Details
#initialize(dir:, trusted: false) ⇒ Base
30 |
# File 'lib/pikuri/bundle/base.rb', line 30 def initialize(dir:, trusted: false) = super |
Instance Attribute Details
#dir ⇒ Object (readonly)
Returns the value of attribute dir
26 27 28 |
# File 'lib/pikuri/bundle/base.rb', line 26 def dir @dir end |
#trusted ⇒ Object (readonly)
Returns the value of attribute trusted
26 27 28 |
# File 'lib/pikuri/bundle/base.rb', line 26 def trusted @trusted end |