Method: Command::List#execute
- Defined in:
- lib/command/list.rb
#execute(argv) ⇒ Object
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/command/list.rb', line 232 def execute(argv) super database_values = Database.instance.get_object.values if !argv.empty? && argv.first =~ /^\d+$/ num = argv.first.to_i else num = database_values.size end if @options["latest"] database_values = Database.instance.sort_by(view_date_type) end database_values.reverse! if @options["reverse"] novels = database_values[0, num] output_list(novels) end |