lib/net/sftp/protocol/01/attributes.rb
# Parses the given buffer and returns an Attributes object compsed from
# the data extracted from it.
Parses the given buffer and returns an Attributes object compsed from
the data extracted from it.
Parses the given buffer and returns an Attributes object compsed from the data extracted from it .
def from_buffer(buffer)
        flags = buffer.read_long
        data = {}
        elements.each do |name, type, condition|
          if flags & condition == condition
            if type == :special
              data[name] = send("parse_#{name}", buffer)
            else
              data[name] = buffer.send("read_#{type}")
            end
          end
        end
        new(data)
      end
def from_buffer ( buffer ) flags = buffer . read_long data = { } elements . each do | name , type , condition | if flags & condition == condition if type == :special data [ name ] = send ( "parse_#{name}" , buffer ) else data [ name ] = buffer . send ( "read_#{type}" ) end end end new ( data ) end
Parses the given buffer and returns an Attributes object compsed from
the data extracted from it.
Parses the given buffer and returns an Attributes object compsed from the data extracted from it .
buffer
<not_specific>