Sha256: f8f9e7ad3c4325329b8008322c805caa13dfc0d7fd0d9709b56723605c4cdc91

Contents?: true

Size: 599 Bytes

Versions: 3

Compression:

Stored size: 599 Bytes

Contents

class SpeedTouch < Oxidized::Model
  prompt /([\w{}=]+[>])$/
  comment '! '

  expect /login$/ do
    send "\n"
    ""
  end

  cmd ':env list' do |cfg|
    cfg.each_line.select do |line|
      (not line.match /:env list$/) &&
        (not line.match /{\w+}=>$/)
    end.join
    comment cfg
  end

  cmd ':config dump' do |cfg|
    cfg.each_line.select do |line|
      (not line.match /:config dump$/) &&
        (not line.match /{\w+}=>$/)
    end.join
    cfg
  end

  cfg :telnet do
    username /^Username : /
    password /^Password : /
  end

  cfg :telnet do
    pre_logout 'exit'
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
oxidized-0.29.0 lib/oxidized/model/speedtouch.rb
oxidized-0.28.0 lib/oxidized/model/speedtouch.rb
oxidized-0.27.0 lib/oxidized/model/speedtouch.rb