Class: Antelope::DSL::Contexts::Match
- Defined in:
- lib/antelope/dsl/contexts/match.rb
Instance Attribute Summary collapse
-
#matches ⇒ Object
(also: #data)
readonly
private
Returns the value of attribute matches.
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Antelope::DSL::Contexts::Base
Instance Attribute Details
#matches ⇒ Object (readonly, private) Also known as: data
Returns the value of attribute matches.
15 16 17 |
# File 'lib/antelope/dsl/contexts/match.rb', line 15 def matches @matches end |
Instance Method Details
#before_call ⇒ Object (private)
18 19 20 |
# File 'lib/antelope/dsl/contexts/match.rb', line 18 def before_call @matches = [] end |
#match(options) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/antelope/dsl/contexts/match.rb', line 5 def match() body = .fetch(:body) action = .fetch(:action) prec = .fetch(:prec, '') @matches << { body: body, action: "{#{action}}", prec: prec } end |