Class: FindCommand
- Inherits:
-
Object
- Object
- FindCommand
- Defined in:
- lib/justy/commands/find_command.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#files ⇒ Object
Returns the value of attribute files.
Instance Method Summary collapse
-
#initialize ⇒ FindCommand
constructor
A new instance of FindCommand.
- #output ⇒ Object
- #run(folder) ⇒ Object
Constructor Details
#initialize ⇒ FindCommand
Returns a new instance of FindCommand.
6 7 8 |
# File 'lib/justy/commands/find_command.rb', line 6 def initialize @files = {} end |
Instance Attribute Details
#files ⇒ Object
Returns the value of attribute files.
4 5 6 |
# File 'lib/justy/commands/find_command.rb', line 4 def files @files end |
Instance Method Details
#output ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/justy/commands/find_command.rb', line 14 def output puts "\r\n === Identical files ===\n" @files.each_value do |filename_array| if filename_array.length > 1 puts "-------------------" filename_array.each { |filename| puts ' '+filename } end end end |
#run(folder) ⇒ Object
10 11 12 |
# File 'lib/justy/commands/find_command.rb', line 10 def run(folder) end |