This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rspec' | |
| class Array | |
| def flatten_ints(all=[]) | |
| self.each do |item| | |
| if item.class == Array | |
| item.flatten_ints(all) | |
| else | |
| unless item.class == Fixnum | |
| raise TypeError.new "This Methos is only for flattening Fixnums" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module ActiveRecord | |
| module Type | |
| class Json < ActiveModel::Type::Value | |
| include ActiveModel::Type::Helpers::Mutable | |
| def deserialize(value) | |
| value = '{}' if value.is_a?(::NilClass) | |
| return value unless value.is_a?(::String) | |
| ActiveSupport::JSON.decode(value) rescue nil | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "formula" | |
| class BrowsermobProxy < Formula | |
| homepage "http://bmp.lightbody.net/" | |
| url "https://github.com/lightbody/browsermob-proxy/releases/download/browsermob-proxy-2.1.4/browsermob-proxy-2.1.4-bin.zip", :using => :curl | |
| sha1 "27c4080411adff919586e909c664c73bebb8ba8bfcaea259ce58327222e5e8fb" | |
| version "2.1.4" | |
| def install | |
| prefix.install Dir["*"] | |
| end |
OlderNewer