class Gzr::Commands::Dashboard::Rm
Public Class Methods
new(dashboard,options)
click to toggle source
Calls superclass method
Gzr::Command::new
# File lib/gzr/commands/dashboard/rm.rb, line 32 def initialize(dashboard,options) super() @dashboard = dashboard @options = options end
Public Instance Methods
execute(input: $stdin, output: $stdout)
click to toggle source
# 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 if @options[:restore] update_dashboard(@dashboard, {:deleted=>false}) elsif @options[:soft] update_dashboard(@dashboard, {:deleted=>true}) else delete_dashboard(@dashboard) end end end