Skip to content

Encapsulates hostnames making them more convenient.

License

Notifications You must be signed in to change notification settings

chris-huxtable/hostname.cr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hostname.cr

Docs GitHub release Build Status

Encapsulates hostnames making them more convenient.

Installation

Add this to your application's shard.yml:

dependencies:
  hostname:
    github: chris-huxtable/hostname.cr

Usage

require "hostname"

Some samples:

hostname0 = Hostname["example.com"]
hostname1 = Hostname["example.com"]?
hostname2 = Hostname.new("example.com")
hostname3 = Hostname.new?("example.com")

an_address = hostname0.address?()
adresses = hostname0.addresses()

hostname0.each_address() { |address|
	puts address
}

Contributing

  1. Fork it ( https://github.com/chris-huxtable/hostname.cr/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors