Sha256: 7357e8cfeb3317d33c1cc5f54762d95d473ea3ece165ad764ed0ad4a706aa509

Contents?: true

Size: 621 Bytes

Versions: 37

Compression:

Stored size: 621 Bytes

Contents

# We're using this strategy borrowed from ActiveSupport to
# make command syntax a little more flexible. In a perfect 
# world we'd just use the double splat feature of Ruby, but 
# support for that is pretty limited at this point, so we're 
# going the extra mile to be cool.
#
module Caracal
  class Utilities
    
    #-------------------------------------------------------------
    # Public Class Methods
    #-------------------------------------------------------------
    
    def self.extract_options!(args)
      if args.last.is_a?(Hash)
        args.pop
      else
        {}
      end
    end
    
  end
end

Version data entries

37 entries across 37 versions & 2 rubygems

Version Path
caracal-1.0.6 lib/caracal/utilities.rb
caracal-1.0.5 lib/caracal/utilities.rb
caracal-1.0.4 lib/caracal/utilities.rb
caracal-1.0.3 lib/caracal/utilities.rb
caracal-1.0.2 lib/caracal/utilities.rb
caracal-1.0.1 lib/caracal/utilities.rb
caracal-1.0.0 lib/caracal/utilities.rb
caracal-0.3.0 lib/caracal/utilities.rb
caracal-0.2.1 lib/caracal/utilities.rb
caracal-0.2.0 lib/caracal/utilities.rb
caracal-0.1.8 lib/caracal/utilities.rb
caracal-0.1.7 lib/caracal/utilities.rb
caracal-0.1.6 lib/caracal/utilities.rb
caracal-0.1.5 lib/caracal/utilities.rb
caracal-0.1.4 lib/caracal/utilities.rb
caracal-0.1.3 lib/caracal/utilities.rb
caracal-0.1.2 lib/caracal/utilities.rb