Class: Ropian::Meter::Generic
- Inherits:
-
Object
- Object
- Ropian::Meter::Generic
- Defined in:
- lib/ropian/meter/generic.rb
Instance Method Summary collapse
-
#initialize(ip_addr, community, version = :SNMPv2c) ⇒ Generic
constructor
A new instance of Generic.
- #inspect ⇒ Object
Constructor Details
#initialize(ip_addr, community, version = :SNMPv2c) ⇒ Generic
Returns a new instance of Generic.
7 8 9 10 |
# File 'lib/ropian/meter/generic.rb', line 7 def initialize(ip_addr, community, version = :SNMPv2c) @manager = SNMP::Manager.new(:Host => ip_addr, :Community => community, :Version => version) end |
Instance Method Details
#inspect ⇒ Object
4 5 6 |
# File 'lib/ropian/meter/generic.rb', line 4 def inspect "#<#{self.class} #{@manager.host}@#{@manager.community}>" end |