Class: FuturoCube::ListCommand
- Inherits:
-
Object
- Object
- FuturoCube::ListCommand
- Defined in:
- lib/futurocube/list_command.rb
Instance Method Summary collapse
Instance Method Details
#args_valid?(args) ⇒ Boolean
13 14 15 |
# File 'lib/futurocube/list_command.rb', line 13 def args_valid?(args) args.length == 1 end |
#exec(file) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/futurocube/list_command.rb', line 5 def exec(file) ResourceFile.open(file) do |rf| rf.records.each do |rec| puts "#{rec.name.ljust(20)} #{rec.data_length.to_s.rjust(10)}" end end end |
#usage ⇒ Object
17 18 19 |
# File 'lib/futurocube/list_command.rb', line 17 def usage "filename" end |