Giter Site home page Giter Site logo

martinpoljak / hash-utils Goto Github PK

View Code? Open in Web Editor NEW
8.0 8.0 0.0 341 KB

Adds more than 125 useful and frequently rather fundamental methods which are missing in Ruby programming language, to Array, File, Hash, Object, String and Symbol classes. It tries to be similar project to Ruby Facets on principle, but less complex, more practical, non-atomic and organized by better way.

License: MIT License

Ruby 100.00%

hash-utils's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hash-utils's Issues

gem incompatible with rails 4+

this gem adds a bunch of methods to the raw ruby classes (which is what ActiveSupport already does for rails)

Moreover, it adds a to_sym method to all objects :

alias :to_sym :to_symbol

which breaks rails inclusion/exclusion validation :
validates :channels, inclusion: { in: %w[web mobile] }
will throw :
TypeError: ["web", "mobile"] is not a symbol nor a string

because of this to_sym method :
https://github.com/rails/rails/blob/92fd1c202bc6cdb945c110b23f9879de0fbd9b0e/activemodel/lib/active_model/validations/clusivity.rb#L22-L23

I had this gem in my dependency tree before realysing it :
jpegtran -> unix-whereis -> hash-utils

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.