Class: TkWrapper::Widgets::Base::Match
- Inherits:
-
Object
- Object
- TkWrapper::Widgets::Base::Match
- Defined in:
- lib/widgets/base/match.rb
Overview
single ‘match’ as part of a Matches object
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#match ⇒ Object
readonly
Returns the value of attribute match.
-
#widget ⇒ Object
readonly
Returns the value of attribute widget.
Instance Method Summary collapse
-
#initialize(value, cls: nil, match: nil, widget: nil) ⇒ Match
constructor
A new instance of Match.
- #tk_widget ⇒ Object
Constructor Details
#initialize(value, cls: nil, match: nil, widget: nil) ⇒ Match
Returns a new instance of Match.
7 8 9 10 11 12 13 |
# File 'lib/widgets/base/match.rb', line 7 def initialize(value, cls: nil, match: nil, widget: nil) @key = match&.[](0) || value @widget = @match = match @cls = cls @value = value end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
5 6 7 |
# File 'lib/widgets/base/match.rb', line 5 def key @key end |
#match ⇒ Object (readonly)
Returns the value of attribute match.
5 6 7 |
# File 'lib/widgets/base/match.rb', line 5 def match @match end |
#widget ⇒ Object (readonly)
Returns the value of attribute widget.
5 6 7 |
# File 'lib/widgets/base/match.rb', line 5 def @widget end |
Instance Method Details
#tk_widget ⇒ Object
15 16 17 |
# File 'lib/widgets/base/match.rb', line 15 def @widget&. end |