Sha256: ec9ccd0bee03ce6526c99e769369c9a58a6cf2b0a881c0670147bdcca19daf21

Contents?: true

Size: 403 Bytes

Versions: 2

Compression:

Stored size: 403 Bytes

Contents

module HostsFile
  class Host
    attr_accessor :ip_address, :canonical_hostname, :aliases

    def initialize(ip_address, canonical_hostname, aliases = [])
      @ip_address = ip_address
      @canonical_hostname = canonical_hostname
      @aliases = aliases
    end

    def name
      hostname
    end

    def hostname
      canonical_hostname
    end

    def ip
      ip_address
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hosts_file-1.0.3 lib/hosts_file/host.rb
hosts_file-0.0.2 lib/hosts_file/host.rb