Class: Claus
- Inherits:
-
Object
- Object
- Claus
- Defined in:
- lib/claus.rb
Overview
Santa Claus tells ya if you’re naughty or nice.
Defined Under Namespace
Modules: AST
Instance Attribute Summary collapse
-
#ast ⇒ Object
readonly
Returns the value of attribute ast.
Instance Method Summary collapse
-
#initialize(expression) ⇒ Claus
constructor
A new instance of Claus.
- #match?(value) ⇒ Boolean
Constructor Details
#initialize(expression) ⇒ Claus
Returns a new instance of Claus.
20 21 22 |
# File 'lib/claus.rb', line 20 def initialize expression @ast = compile(expression) end |
Instance Attribute Details
#ast ⇒ Object (readonly)
Returns the value of attribute ast.
18 19 20 |
# File 'lib/claus.rb', line 18 def ast @ast end |
Instance Method Details
#match?(value) ⇒ Boolean
24 25 26 |
# File 'lib/claus.rb', line 24 def match? value @ast.match?(value) end |