Method: RuboCop::AST::RegexpNode#options

Defined in:
lib/rubocop/ast/node/regexp_node.rb

#optionsInteger

NOTE: The ‘o’ option is ignored.

Returns:

  • (Integer)

    the Regexp option bits as returned by Regexp#options

[View source] [View on GitHub]

32
33
34
# File 'lib/rubocop/ast/node/regexp_node.rb', line 32

def options
  regopt.children.map { |opt| OPTIONS.fetch(opt) }.inject(0, :|)
end