Class: CodeMiner::RegexpExpression
- Inherits:
-
Expression
- Object
- Expression
- CodeMiner::RegexpExpression
- Defined in:
- lib/codeminer/expressions/regexp_expression.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from Expression
#args, #block, #delimiter, #src, #token
Instance Method Summary collapse
- #add(regex) ⇒ Object
- #each ⇒ Object
-
#initialize ⇒ RegexpExpression
constructor
A new instance of RegexpExpression.
- #type ⇒ Object
Methods inherited from Expression
Methods included from SourceExtract::Usage
#adjust_src, #column, #column=, #end_column, #end_column=, #end_line, #end_line=, #line, #line=, #src, #src_extract
Constructor Details
#initialize ⇒ RegexpExpression
Returns a new instance of RegexpExpression.
7 8 9 |
# File 'lib/codeminer/expressions/regexp_expression.rb', line 7 def initialize @content = [] end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
5 6 7 |
# File 'lib/codeminer/expressions/regexp_expression.rb', line 5 def value @value end |
Instance Method Details
#add(regex) ⇒ Object
19 20 21 22 |
# File 'lib/codeminer/expressions/regexp_expression.rb', line 19 def add(regex) @content << regex self end |
#each ⇒ Object
15 16 17 |
# File 'lib/codeminer/expressions/regexp_expression.rb', line 15 def each @content end |
#type ⇒ Object
11 12 13 |
# File 'lib/codeminer/expressions/regexp_expression.rb', line 11 def type :regexp end |