class Terse::Keyword
A class storing all information about a keyword & what it should be transformed into
Attributes
follow_on_regex[RW]
follow_on_substitute[RW]
is_end[RW]
keyword[RW]
needs_inner_end[RW]
needs_inner_start[RW]
needs_line_ending[RW]
some keywords naturally imply that the line should have a line-ending, e.g. ; for Java line-endings should not be applied if the keyword indicates the start/end of a class/method/block, etc. Internally, :needs_top_level_end and :needs_inner_end take priority over :needs_line_ending
needs_top_level_end[RW]
needs_top_level_start[RW]
regex[RW]
substitute[RW]
try_follow_on_regex[RW]
Public Class Methods
new(keyword)
click to toggle source
# File lib/terse/keyword.rb, line 22 def initialize(keyword) @keyword = keyword @regex = gen_regex_from_keyword keyword @follow_on_regex = gen_regex_from_keyword_including_follow_on keyword end