diff options
author | Michael Herold <opensource@michaeljherold.com> | 2018-09-30 14:07:18 -0500 |
---|---|---|
committer | Michael Herold <opensource@michaeljherold.com> | 2018-09-30 14:59:58 -0500 |
commit | 5b5ed2119d63295fb180ecf1872b9e70e389c831 (patch) | |
tree | 3c80581ee004d9ad31f1981100852ff8063a3066 /lib/hashie/mash.rb | |
parent | 0235a18c14365b69773f99312bad590d0e66ee2d (diff) | |
download | hashie-5b5ed2119d63295fb180ecf1872b9e70e389c831.tar.gz |
[rubocop] Improve our RuboCop setup
Disable Metrics/BlockLength in specs because the length of a block in
the test suite isn't something we want to lint. We want the tests to be
as long as they need to be.
Set an explicit line length metric instead of continually updating this
as we go. Let's pick a max line length that we want to see and stick
with it. This metric should only ever decrease: we don't want to see it
ever increase again.
Diffstat (limited to 'lib/hashie/mash.rb')
-rw-r--r-- | lib/hashie/mash.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/hashie/mash.rb b/lib/hashie/mash.rb index bc5873c..02ccc3f 100644 --- a/lib/hashie/mash.rb +++ b/lib/hashie/mash.rb @@ -16,8 +16,10 @@ module Hashie # * No punctuation: Returns the value of the hash for that key, or nil if none exists. # * Assignment (<tt>=</tt>): Sets the attribute of the given method name. # * Existence (<tt>?</tt>): Returns true or false depending on whether that key has been set. - # * Bang (<tt>!</tt>): Forces the existence of this key, used for deep Mashes. Think of it as "touch" for mashes. - # * Under Bang (<tt>_</tt>): Like Bang, but returns a new Mash rather than creating a key. Used to test existance in deep Mashes. + # * Bang (<tt>!</tt>): Forces the existence of this key, used for deep Mashes. Think of it + # as "touch" for mashes. + # * Under Bang (<tt>_</tt>): Like Bang, but returns a new Mash rather than creating a key. + # Used to test existance in deep Mashes. # # == Basic Example # @@ -64,8 +66,11 @@ module Hashie ALLOWED_SUFFIXES = %w[? ! = _].freeze class CannotDisableMashWarnings < StandardError - def initialize(message = 'You cannot disable warnings on the base Mash class. Please subclass the Mash and disable it in the subclass.') - super(message) + def initialize + super( + 'You cannot disable warnings on the base Mash class. ' \ + 'Please subclass the Mash and disable it in the subclass.' + ) end end |