lib/net/sftp/protocol/01/attributes.rb
# Returns the group-id of the group that owns the file, or +nil+ if that
# information is not available. If a :group key exists, but not a :gid
# key, the Etc module will be used to reverse lookup the id from the name.
# This might fail on some systems (e.g., Windows).
Returns the group-id of the group that owns the file, or +nil+ if that
information is not available. If a :group key exists, but not a :gid
key, the Etc module will be used to reverse lookup the id from the name.
This might fail on some systems .
Returns the group - id of the group that owns the file or + nil + if that information is not available . If a : group key exists but not a : gid key the Etc module will be used to reverse lookup the id from the name . This might fail on some systems .
def gid
      if attributes[:group] && !attributes.key?(:gid)
        require 'etc'
        attributes[:gid] = Etc.getgrnam(attributes[:group]).gid
      end
      attributes[:gid]
    end
def gid if attributes [ :group ] && ! attributes . key? ( :gid ) require 'etc' attributes [ :gid ] = Etc . getgrnam ( attributes [ :group ] ) . gid end attributes [ :gid ] end
Returns the group-id of the group that owns the file, or +nil+ if that
information is not available.
Returns the group - id of the group that owns the file or + nil + if that information is not available .