Skip to content

Commit d6fe9f0

Browse files
committed
Implement Parser#has_more_commands?
1 parent 707d118 commit d6fe9f0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/parser.rb

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1-
module Parser
1+
class Parser
2+
attr_reader :input
3+
4+
def initialize(input)
5+
@input = input
6+
end
7+
8+
def has_more_commands?
9+
!input.gsub(%r{//.*$}, '').strip.empty?
10+
end
211
end

0 commit comments

Comments
 (0)