Class: TextExtractor::Directives::Begin
- Inherits:
-
Directive
- Object
- Directive
- TextExtractor::Directives::Begin
show all
- Defined in:
- lib/text_extractor/directives/classes.rb
Overview
Instance Attribute Summary
Attributes inherited from Directive
#state
Instance Method Summary
collapse
Methods inherited from Directive
#initialize, #values
Instance Method Details
#call ⇒ Object
38
39
40
41
|
# File 'lib/text_extractor/directives/classes.rb', line 38
def call
state.current = nil
state.groups.push @group
end
|
#group(*args) ⇒ Object
34
35
36
|
# File 'lib/text_extractor/directives/classes.rb', line 34
def group(*args)
Group.new(*args)
end
|
#init ⇒ Object
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/text_extractor/directives/classes.rb', line 22
def init
type = case @argument
when '', nil
'?:'
when '?:'
''
else
@argument
end
@group = group(type)
end
|