Class: Gzr::Commands::Dashboard::Rm
- Inherits:
-
Gzr::Command
- Object
- Gzr::Command
- Gzr::Commands::Dashboard::Rm
- Includes:
- Dashboard
- Defined in:
- lib/gzr/commands/dashboard/rm.rb
Instance Method Summary collapse
- #execute(input: $stdin, output: $stdout) ⇒ Object
-
#initialize(dashboard, options) ⇒ Rm
constructor
A new instance of Rm.
Methods included from Dashboard
#create_dashboard, #create_dashboard_element, #create_dashboard_filter, #create_dashboard_layout, #delete_dashboard, #delete_dashboard_element, #delete_dashboard_filter, #delete_dashboard_layout, #query_dashboard, #search_dashboards_by_slug, #search_dashboards_by_title, #update_dashboard, #update_dashboard_element, #update_dashboard_filter, #update_dashboard_layout, #update_dashboard_layout_component
Methods inherited from Gzr::Command
#create_merge_query, #create_query, #field_expression, #field_names, #keys_to_keep, #merge_query, #pairs, #query, #render_csv, #run_inline_query
Methods included from Session
#build_connection_hash, #login, #logout_all, #pastel, #say_error, #say_ok, #say_warning, #v3_1_available?, #with_session
Constructor Details
#initialize(dashboard, options) ⇒ Rm
Returns a new instance of Rm.
32 33 34 35 36 |
# File 'lib/gzr/commands/dashboard/rm.rb', line 32 def initialize(dashboard,) super() @dashboard = dashboard @options = end |
Instance Method Details
#execute(input: $stdin, output: $stdout) ⇒ Object
38 39 40 41 42 43 |
# File 'lib/gzr/commands/dashboard/rm.rb', line 38 def execute(input: $stdin, output: $stdout) say_warning("options: #{@options.inspect}") if @options[:debug] with_session do delete_dashboard(@dashboard) end end |