Class: RegexpExamples::DotGroup
- Inherits:
-
Object
- Object
- RegexpExamples::DotGroup
- Includes:
- RandomResultBySample
- Defined in:
- lib/regexp-examples/groups.rb
Instance Attribute Summary collapse
-
#multiline ⇒ Object
readonly
Returns the value of attribute multiline.
Instance Method Summary collapse
-
#initialize(multiline) ⇒ DotGroup
constructor
A new instance of DotGroup.
- #result ⇒ Object
Methods included from RandomResultBySample
Constructor Details
#initialize(multiline) ⇒ DotGroup
Returns a new instance of DotGroup.
88 89 90 |
# File 'lib/regexp-examples/groups.rb', line 88 def initialize(multiline) @multiline = multiline end |
Instance Attribute Details
#multiline ⇒ Object (readonly)
Returns the value of attribute multiline.
87 88 89 |
# File 'lib/regexp-examples/groups.rb', line 87 def multiline @multiline end |
Instance Method Details
#result ⇒ Object
92 93 94 95 96 97 |
# File 'lib/regexp-examples/groups.rb', line 92 def result chars = multiline ? CharSets::Any : CharSets::AnyNoNewLine chars.map do |result| GroupResult.new(result) end end |