lib/lucid/interface_rb/matcher.rb in lucid-0.2.1 vs lib/lucid/interface_rb/matcher.rb in lucid-0.3.0
- old
+ new
@@ -39,26 +39,26 @@
modified_pattern
end
def do_block
- do_block = ""
+ do_block = ''
do_block << "do#{arguments}\n"
do_block << multiline_comment if multiline_argument_class?
do_block << " pending\n"
- do_block << "end"
+ do_block << 'end'
do_block
end
def arguments
block_args = (0...number_of_arguments).map { |n| "arg#{n+1}" }
if multiline_argument_class
block_args << multiline_argument_class.default_arg_name
end
- block_args.empty? ? "" : " |#{block_args.join(", ")}|"
+ block_args.empty? ? '' : " |#{block_args.join(", ")}|"
end
def multiline_comment
" # #{multiline_argument_class.default_arg_name} is a #{multiline_argument_class.to_s}\n"
end
@@ -66,41 +66,41 @@
def multiline_argument_class?
multiline_argument_class == AST::Table
end
def self.example
- new("Given", "some phrase", nil).step
+ new('Given', 'some phrase', nil).step
end
end
class Regexp < BaseMatcher
def typed_pattern
" (/^#{pattern}$/)"
end
def self.description
- "Matchers with parentheses."
+ 'Matchers with parentheses.'
end
end
class Classic < BaseMatcher
def typed_pattern
" /^#{pattern}$/"
end
def self.description
- "Matchers without parentheses."
+ 'Matchers without parentheses.'
end
end
class Percent < BaseMatcher
def typed_pattern
" %r{^#{pattern}$}"
end
def self.description
- "Matchers with delimited regexp."
+ 'Matchers with delimited regexp.'
end
end
end
end