TypedMap is a Hash with typed keys and values.
Add this line to your application's Gemfile:
gem 'typed_map'
And then execute:
$ bundle
Or install it yourself as:
$ gem install typed_map
TypedMap is a very simple data structure. It provides only 4 methods that are described below:
pathes = TypedMap.new ktype: Symbol, vtype: String
pathes.add :root, "/"
pathes.add "key", "val" # Error
pathes.add :key, :val # Error
pathes.has? :root # => true
pathes.keys # => [:root]
pathes[:root] # => "/"
- Fork it ( https://github.com/[my-github-username]/typed_map/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request