Class: CodeParser

Inherits:
Object
  • Object
show all
Defined in:
app/runners_strategy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, parser) ⇒ CodeParser

Returns a new instance of CodeParser.



42
43
44
45
# File 'app/runners_strategy.rb', line 42

def initialize(code, parser)
  @code = code
  @parser = parser
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



40
41
42
# File 'app/runners_strategy.rb', line 40

def code
  @code
end

#parserObject (readonly)

Returns the value of attribute parser.



40
41
42
# File 'app/runners_strategy.rb', line 40

def parser
  @parser
end

Instance Method Details

#parseObject



47
48
49
# File 'app/runners_strategy.rb', line 47

def parse
  parser.parse(code)
end