Class: RegexpExamples::MultiGroup
- Inherits:
-
Object
- Object
- RegexpExamples::MultiGroup
- Defined in:
- lib/regexp-examples/groups.rb
Instance Attribute Summary collapse
-
#group_id ⇒ Object
readonly
Returns the value of attribute group_id.
Instance Method Summary collapse
-
#initialize(groups, group_id) ⇒ MultiGroup
constructor
A new instance of MultiGroup.
- #random_result ⇒ Object
- #result ⇒ Object
Constructor Details
#initialize(groups, group_id) ⇒ MultiGroup
Returns a new instance of MultiGroup.
109 110 111 112 |
# File 'lib/regexp-examples/groups.rb', line 109 def initialize(groups, group_id) @groups = groups @group_id = group_id end |
Instance Attribute Details
#group_id ⇒ Object (readonly)
Returns the value of attribute group_id.
108 109 110 |
# File 'lib/regexp-examples/groups.rb', line 108 def group_id @group_id end |
Instance Method Details
#random_result ⇒ Object
118 119 120 |
# File 'lib/regexp-examples/groups.rb', line 118 def random_result result_by_method(:random_result) end |
#result ⇒ Object
114 115 116 |
# File 'lib/regexp-examples/groups.rb', line 114 def result result_by_method(:result) end |