Parent

Regin::Options

Attributes

multiline[R]
ignorecase[R]
extended[R]

Public Class Methods

from_int(flags) click to toggle source
   # File lib/rack/mount/vendor/regin/regin/options.rb, line 3
3:     def self.from_int(flags)
4:       multiline  = flags & Regexp::MULTILINE != 0
5:       ignorecase = flags & Regexp::IGNORECASE != 0
6:       extended   = flags & Regexp::EXTENDED != 0
7: 
8:       new(multiline, ignorecase, extended)
9:     end
new(*args) click to toggle source
    # File lib/rack/mount/vendor/regin/regin/options.rb, line 13
13:     def initialize(*args)
14:       if args.first.is_a?(Hash)
15:         @multiline  = args[0][:multiline]
16:         @ignorecase = args[0][:ignorecase]
17:         @extended   = args[0][:extended]
18:       else
19:         @multiline  = args[0]
20:         @ignorecase = args[1]
21:         @extended   = args[2]
22:       end
23:     end

Public Instance Methods

any?(explicit = false) click to toggle source
    # File lib/rack/mount/vendor/regin/regin/options.rb, line 25
25:     def any?(explicit = false)
26:       if explicit
27:         !multiline.nil? || !ignorecase.nil? || !extended.nil?
28:       else
29:         multiline || ignorecase || extended
30:       end
31:     end
to_h(explicit = false) click to toggle source
    # File lib/rack/mount/vendor/regin/regin/options.rb, line 33
33:     def to_h(explicit = false)
34:       if explicit
35:         options = {}
36:         options[:multiline]  = multiline  unless multiline.nil?
37:         options[:ignorecase] = ignorecase unless ignorecase.nil?
38:         options[:extended]   = extended   unless extended.nil?
39:         options
40:       else
41:         { :multiline => multiline,
42:           :ignorecase => ignorecase,
43:           :extended => extended }
44:       end
45:     end
to_i() click to toggle source
    # File lib/rack/mount/vendor/regin/regin/options.rb, line 47
47:     def to_i
48:       flag = 0
49:       flag |= Regexp::MULTILINE if multiline
50:       flag |= Regexp::IGNORECASE if ignorecase
51:       flag |= Regexp::EXTENDED if extended
52:       flag
53:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.