Class: MPD::Commands::Ping

Inherits:
Abstract show all
Defined in:
lib/mpd/commands/ping.rb

Overview

Tries to execute “ping” command. Returns `true` if succedeed, raises error if `MpdError` occurred, `false` otherwise

Instance Attribute Summary

Attributes inherited from Abstract

#connection

Instance Method Summary collapse

Methods inherited from Abstract

#initialize

Constructor Details

This class inherits a constructor from MPD::Commands::Abstract

Instance Method Details

#executeObject

rubocop:disable Lint/RescueWithoutErrorClass


13
14
15
16
17
18
19
# File 'lib/mpd/commands/ping.rb', line 13

def execute
  super('ping')
  true
rescue => e
  raise e if e.is_a?(MpdError)
  false
end