Class: Kamaze::Project::Tools::Git::Status::FilesArray Abstract
- Defined in:
- lib/kamaze/project/tools/git/status/files_array.rb
Overview
This class is abstract.
Initialized using an Array representation of status
A memento is kept. Given files are filtered by type.
Class Attribute Summary collapse
-
.type ⇒ Symbol
readonly
Get type.
Instance Attribute Summary collapse
- #memento ⇒ Array readonly protected
Instance Method Summary collapse
-
#initialize(status) ⇒ FilesArray
constructor
Initialize using given status array representation.
Constructor Details
#initialize(status) ⇒ FilesArray
Initialize using given status array representation
28 29 30 31 32 33 |
# File 'lib/kamaze/project/tools/git/status/files_array.rb', line 28 def initialize(status) super status.clone .keep_if { |file| file.public_send("#{self.class.type}?") } @memento = status.clone.map(&:freeze).freeze end |
Class Attribute Details
.type ⇒ Symbol (readonly)
Get type
22 23 24 |
# File 'lib/kamaze/project/tools/git/status/files_array.rb', line 22 def type @type end |
Instance Attribute Details
#memento ⇒ Array (readonly, protected)
38 39 40 |
# File 'lib/kamaze/project/tools/git/status/files_array.rb', line 38 def memento @memento end |