Class: TokenHawk::CLI::Commands::Recent
- Inherits:
-
Object
- Object
- TokenHawk::CLI::Commands::Recent
- Includes:
- Formatter
- Defined in:
- lib/token_hawk/cli/commands/recent.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Recent
constructor
A new instance of Recent.
- #run ⇒ Object
Methods included from Formatter
Constructor Details
#initialize(options = {}) ⇒ Recent
Returns a new instance of Recent.
11 12 13 |
# File 'lib/token_hawk/cli/commands/recent.rb', line 11 def initialize( = {}) @options = end |
Instance Method Details
#run ⇒ Object
15 16 17 18 |
# File 'lib/token_hawk/cli/commands/recent.rb', line 15 def run records = CallRecord.order(created_at: :desc).limit(limit) @options["format"] == "json" ? print_json(records) : print_table(records) end |