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.
102 103 104 105 |
# File 'lib/regexp-examples/groups.rb', line 102 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.
101 102 103 |
# File 'lib/regexp-examples/groups.rb', line 101 def group_id @group_id end |
Instance Method Details
#random_result ⇒ Object
111 112 113 |
# File 'lib/regexp-examples/groups.rb', line 111 def random_result result_by_method(:random_result) end |
#result ⇒ Object
107 108 109 |
# File 'lib/regexp-examples/groups.rb', line 107 def result result_by_method(:result) end |