Skip to content

Did the method end with "?" or "!"‽ Interrobang gives you the best of both worlds‽

Notifications You must be signed in to change notification settings

sshaw/interrobang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Interrobang

‽‽‽‽‽‽‽‽‽‽‽‽‽‽‽‽‽‽

Did the method end with ? or !‽ Interrobang gives you the best of both worlds‽

Usage

require "interrobang"

class Foo
  def bar!
    "something amaaaaazing!"
  end

  def baz?
    false
  end
end

Interrobang.only(Foo)

foo = Foo.new
foo.bar!     # "something amaaaaazing!"
foo.bar‽     # "something amaaaaazing!"
foo.baz?     # false
foo.baz‽     # false

Feeling really forgetful‽ No problem:

Interrobang.everything

%w[foo bar baz].include?("baz")  # true
%w[foo bar baz].include‽("baz")  # true

"sshaw!".chop!  # "sshaw"
"sshaw!".chop‽  # "sshaw"

See Also

  • AngryRaise - raise exceptions, with emotion and intensity
  • class2 - DSL for creating class hierarchies
  • require3 - Kernel#require something and make it accessible via a different namespace
  • YYMMDD - Tiny DSL for idiomatic date parsing and formatting

Author

Skye Shaw [skye.shaw AT gmail]

License

Released under the MIT License: https://www.opensource.org/licenses/MIT

About

Did the method end with "?" or "!"‽ Interrobang gives you the best of both worlds‽

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages