Class: PiHole::DisableCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/pi_hole/disable_command.rb

Overview

Temporarily disable PiHole blocking

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(duration: 30) ⇒ DisableCommand

Returns a new instance of DisableCommand.

Parameters:

  • duration (Integer) (defaults to: 30)

    Number of seconds to disable PiHole blocking



9
10
11
# File 'lib/pi_hole/disable_command.rb', line 9

def initialize(duration: 30)
  @duration = duration
end

Instance Attribute Details

#durationObject

Returns the value of attribute duration.



6
7
8
# File 'lib/pi_hole/disable_command.rb', line 6

def duration
  @duration
end

Instance Method Details

#query_stringObject

Returns String.

Returns:

  • String



14
15
16
# File 'lib/pi_hole/disable_command.rb', line 14

def query_string
  "disable=#{@duration}"
end