Sha256: 0493d844ec5897d2683b98e2dd1b1353acc401096eb9e93fc96a13a9cc0dbef6

Contents?: true

Size: 637 Bytes

Versions: 23

Compression:

Stored size: 637 Bytes

Contents

class ProconBypassMan::BypassMode
  TYPE_NORMAL = :normal
  TYPE_AGGRESSIVE = :aggressive
  TYPES = [TYPE_NORMAL, TYPE_AGGRESSIVE]

  DEFAULT_GADGET_TO_PROCON_INTERVAL = 0.5

  attr_accessor :mode, :gadget_to_procon_interval

  def self.default_value
    new(
      mode: TYPE_NORMAL,
      gadget_to_procon_interval: DEFAULT_GADGET_TO_PROCON_INTERVAL,
    )
  end

  def initialize(mode: , gadget_to_procon_interval: )
    @mode = mode.to_sym
    @gadget_to_procon_interval = gadget_to_procon_interval
  end

  def to_s
    if mode == TYPE_NORMAL
      "#{mode}(#{gadget_to_procon_interval})"
    else
      mode.to_s
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
procon_bypass_man-0.3.12 lib/procon_bypass_man/procon/value_objects/bypass_mode.rb
procon_bypass_man-0.3.11 lib/procon_bypass_man/procon/value_objects/bypass_mode.rb
procon_bypass_man-0.3.10 lib/procon_bypass_man/procon/value_objects/bypass_mode.rb
procon_bypass_man-0.3.9 lib/procon_bypass_man/procon/value_objects/bypass_mode.rb
procon_bypass_man-0.3.8.1 lib/procon_bypass_man/procon/value_objects/bypass_mode.rb
procon_bypass_man-0.3.8 lib/procon_bypass_man/procon/value_objects/bypass_mode.rb
procon_bypass_man-0.3.7 lib/procon_bypass_man/procon/value_objects/bypass_mode.rb
procon_bypass_man-0.3.6 lib/procon_bypass_man/procon/value_objects/bypass_mode.rb
procon_bypass_man-0.3.5 lib/procon_bypass_man/procon/value_objects/bypass_mode.rb
procon_bypass_man-0.3.4 lib/procon_bypass_man/procon/value_objects/bypass_mode.rb
procon_bypass_man-0.3.3.1 lib/procon_bypass_man/procon/value_objects/bypass_mode.rb
procon_bypass_man-0.3.3 lib/procon_bypass_man/procon/value_objects/bypass_mode.rb
procon_bypass_man-0.3.2 lib/procon_bypass_man/procon/value_objects/bypass_mode.rb
procon_bypass_man-0.3.1 lib/procon_bypass_man/procon/value_objects/bypass_mode.rb
procon_bypass_man-0.3.0 lib/procon_bypass_man/procon/value_objects/bypass_mode.rb
procon_bypass_man-0.2.3 lib/procon_bypass_man/procon/value_objects/bypass_mode.rb
procon_bypass_man-0.2.2 lib/procon_bypass_man/procon/value_objects/bypass_mode.rb
procon_bypass_man-0.2.1 lib/procon_bypass_man/procon/value_objects/bypass_mode.rb
procon_bypass_man-0.2.0 lib/procon_bypass_man/procon/value_objects/bypass_mode.rb
procon_bypass_man-0.1.23 lib/procon_bypass_man/procon/value_objects/bypass_mode.rb