Sha256: 89b793a4a9b554996d1bd28807c2e6707c767cca34735c952931efd2d32c1c2f

Contents?: true

Size: 283 Bytes

Versions: 3

Compression:

Stored size: 283 Bytes

Contents

module RubyApp

  module Mixins

    module Hash

      def method_missing(name, *arguments)
        if name.to_s.match(/(.*)=/)
          self[$~.captures[0].to_s] = arguments[0]
        else
          self[name.to_s] || self[name.to_sym]
        end
      end

    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
RubyApp-0.0.8 lib/ruby_app/mixins/hash.rb
RubyApp-0.0.7 lib/ruby_app/mixins/hash.rb
RubyApp-0.0.6 lib/ruby_app/mixins/hash.rb