Class: Kaisoku::Selection
- Inherits:
-
Struct
- Object
- Struct
- Kaisoku::Selection
- Defined in:
- lib/kaisoku/selection.rb
Instance Attribute Summary collapse
-
#entities ⇒ Object
Returns the value of attribute entities.
-
#fallback ⇒ Object
Returns the value of attribute fallback.
-
#ignored_files ⇒ Object
Returns the value of attribute ignored_files.
-
#invalidate_map ⇒ Object
Returns the value of attribute invalidate_map.
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#safe ⇒ Object
Returns the value of attribute safe.
-
#warnings ⇒ Object
Returns the value of attribute warnings.
Class Method Summary collapse
- .all(entities:, reason:, invalidate_map: false, warnings: []) ⇒ Object
- .none(ignored_files: [], reason: 'checksums unchanged') ⇒ Object
Instance Method Summary collapse
- #count ⇒ Object
- #fallback? ⇒ Boolean
-
#initialize(reason:, entities: [], safe: true, fallback: false, invalidate_map: false, warnings: [], ignored_files: []) ⇒ Selection
constructor
A new instance of Selection.
- #safe? ⇒ Boolean
Constructor Details
#initialize(reason:, entities: [], safe: true, fallback: false, invalidate_map: false, warnings: [], ignored_files: []) ⇒ Selection
Returns a new instance of Selection.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/kaisoku/selection.rb', line 14 def initialize( reason:, entities: [], safe: true, fallback: false, invalidate_map: false, warnings: [], ignored_files: [] ) super end |
Instance Attribute Details
#entities ⇒ Object
Returns the value of attribute entities
4 5 6 |
# File 'lib/kaisoku/selection.rb', line 4 def entities @entities end |
#fallback ⇒ Object
Returns the value of attribute fallback
4 5 6 |
# File 'lib/kaisoku/selection.rb', line 4 def fallback @fallback end |
#ignored_files ⇒ Object
Returns the value of attribute ignored_files
4 5 6 |
# File 'lib/kaisoku/selection.rb', line 4 def ignored_files @ignored_files end |
#invalidate_map ⇒ Object
Returns the value of attribute invalidate_map
4 5 6 |
# File 'lib/kaisoku/selection.rb', line 4 def invalidate_map @invalidate_map end |
#reason ⇒ Object
Returns the value of attribute reason
4 5 6 |
# File 'lib/kaisoku/selection.rb', line 4 def reason @reason end |
#safe ⇒ Object
Returns the value of attribute safe
4 5 6 |
# File 'lib/kaisoku/selection.rb', line 4 def safe @safe end |
#warnings ⇒ Object
Returns the value of attribute warnings
4 5 6 |
# File 'lib/kaisoku/selection.rb', line 4 def warnings @warnings end |
Class Method Details
.all(entities:, reason:, invalidate_map: false, warnings: []) ⇒ Object
29 30 31 32 33 34 35 36 37 |
# File 'lib/kaisoku/selection.rb', line 29 def self.all(entities:, reason:, invalidate_map: false, warnings: []) new( entities: entities, fallback: true, invalidate_map: invalidate_map, reason: reason, warnings: warnings ) end |
.none(ignored_files: [], reason: 'checksums unchanged') ⇒ Object
25 26 27 |
# File 'lib/kaisoku/selection.rb', line 25 def self.none(ignored_files: [], reason: 'checksums unchanged') new(entities: [], reason: reason, ignored_files: ignored_files) end |
Instance Method Details
#count ⇒ Object
39 40 41 |
# File 'lib/kaisoku/selection.rb', line 39 def count entities.length end |
#fallback? ⇒ Boolean
47 48 49 |
# File 'lib/kaisoku/selection.rb', line 47 def fallback? fallback end |
#safe? ⇒ Boolean
43 44 45 |
# File 'lib/kaisoku/selection.rb', line 43 def safe? safe end |