Sha256: 152799655bdb92403f96cb448a585b7a60bab441fe8ab83d03da6dad1502c763
Contents?: true
Size: 607 Bytes
Versions: 4
Compression:
Stored size: 607 Bytes
Contents
module Spec module Example module ArgsAndOptions def args_and_options(*args) # :nodoc: options = Hash === args.last ? args.pop : {} return args, options end def add_options(args, options={}) # :nodoc: args << {} unless Hash === args.last args.extend WithOptions args.options.merge!(options) args.options end def set_location(options, location) # :nodoc: options[:location] ||= location end module WithOptions # :nodoc: def options last end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems