lib/pio/lldp/ttl_tlv.rb in pio-0.3.0 vs lib/pio/lldp/ttl_tlv.rb in pio-0.4.0

- old
+ new

@@ -1,18 +1,18 @@ -# -*- coding: utf-8 -*- -require 'rubygems' +# encoding: utf-8 + require 'bindata' module Pio class Lldp # Time to live TLV class TtlTlv < BinData::Primitive endian :big - bit7 :tlv_type, :value => 3 - bit9 :tlv_info_length, :value => 2 - string :ttl, :read_length => :tlv_info_length + bit7 :tlv_type, value: 3 + bit9 :tlv_info_length, value: 2 + string :ttl, read_length: :tlv_info_length def get BinData::Int16be.read(ttl) end @@ -20,11 +20,5 @@ self.ttl = BinData::Int16be.new(value).to_binary_s end end end end - -### Local variables: -### mode: Ruby -### coding: utf-8-unix -### indent-tabs-mode: nil -### End: