Class: Bard::Ping

Inherits:
Struct
  • Object
show all
Defined in:
lib/bard/plugins/ping/check.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#targetObject

Returns the value of attribute target

Returns:

  • (Object)

    the current value of target



5
6
7
# File 'lib/bard/plugins/ping/check.rb', line 5

def target
  @target
end

Class Method Details

.call(target) ⇒ Object



6
7
8
# File 'lib/bard/plugins/ping/check.rb', line 6

def self.call target
  new(target).call
end

Instance Method Details

#callObject



10
11
12
# File 'lib/bard/plugins/ping/check.rb', line 10

def call
  target.ping.reject { |url| reachable?(url) }
end