Module: Inform::SetHelpers

Included in:
Enumerable, Object
Defined in:
lib/story_teller/helpers.rb

Overview

Some mixins provide exclusive Inform-ification for Ruby, withheld from mixins.rb because of said exclusivity

Instance Method Summary collapse

Instance Method Details

#in?(*others) ⇒ Boolean

Returns:

  • (Boolean)


29
30
31
32
# File 'lib/story_teller/helpers.rb', line 29

def in?(*others)
  return false unless others.respond_to?(:include?)
  others.flatten.include?(self)
end

#notin?(*others) ⇒ Boolean

Returns:

  • (Boolean)


34
35
36
37
# File 'lib/story_teller/helpers.rb', line 34

def notin?(*others)
  return false unless others.respond_to?(:include?)
  !others.flatten.include?(self)
end