Module: Sqlite::CommonTestParser

Included in:
DatasetTestParser, DisplayTestParser, InvalidTestParser, QueryTestParser
Defined in:
lib/parsers/common_test_parser.rb

Constant Summary collapse

COMMENT =
'-- NONE'

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#finalObject (readonly)

Returns the value of attribute final.



5
6
7
# File 'lib/parsers/common_test_parser.rb', line 5

def final
  @final
end

#resultObject (readonly)

Returns the value of attribute result.



5
6
7
# File 'lib/parsers/common_test_parser.rb', line 5

def result
  @result
end

Instance Method Details

#choose(solution) ⇒ Object



13
14
15
# File 'lib/parsers/common_test_parser.rb', line 13

def choose(solution)
  solution
end

#get(key) ⇒ Object



21
22
23
# File 'lib/parsers/common_test_parser.rb', line 21

def get(key)
  @test[key.to_sym]
end

#get_finalObject



30
31
32
# File 'lib/parsers/common_test_parser.rb', line 30

def get_final
  ''
end

#has?(key) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/parsers/common_test_parser.rb', line 17

def has?(key)
  !@test[key.to_sym].blank?
end

#has_final?Boolean

Returns:

  • (Boolean)


25
26
27
28
# File 'lib/parsers/common_test_parser.rb', line 25

def has_final?
  # Only FinalDataset should have final query
  false
end

#initialize(test) ⇒ Object



8
9
10
11
# File 'lib/parsers/common_test_parser.rb', line 8

def initialize(test)
  @test = test
  @result = parse test
end