Class: CodeMiner::RegexpExpression

Inherits:
Expression show all
Defined in:
lib/codeminer/expressions/regexp_expression.rb

Instance Attribute Summary collapse

Attributes inherited from Expression

#args, #block, #delimiter, #src, #token

Instance Method Summary collapse

Methods inherited from Expression

not_implemented

Methods included from SourceExtract::Usage

#adjust_src, #column, #column=, #end_column, #end_column=, #end_line, #end_line=, #line, #line=, #src, #src_extract

Constructor Details

#initializeRegexpExpression

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

#valueObject (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

#eachObject



15
16
17
# File 'lib/codeminer/expressions/regexp_expression.rb', line 15

def each
  @content
end

#typeObject



11
12
13
# File 'lib/codeminer/expressions/regexp_expression.rb', line 11

def type
  :regexp
end