Class: TwitterCldr::Transforms::CommentRule

Inherits:
Rule
  • Object
show all
Includes:
Singleton
Defined in:
lib/twitter_cldr/transforms/comment_rule.rb

Constant Summary

Constants inherited from Rule

Rule::STRING_TYPES

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Rule

#backward?, #forward?, #invert, #is_conversion_rule?, #is_conversion_rule_set?, #is_filter_rule?, #is_transform_rule?, #is_variable?, regexp_token_string, remove_comment, replace_symbols, #token_string, token_string, #token_value, token_value

Class Method Details

.accepts?(rule_text) ⇒ Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/twitter_cldr/transforms/comment_rule.rb', line 19

def accepts?(rule_text)
  rule_text.strip.start_with?('#')
end

.parse(rule_text, symbol_table, index) ⇒ Object



15
16
17
# File 'lib/twitter_cldr/transforms/comment_rule.rb', line 15

def parse(rule_text, symbol_table, index)
  instance
end

Instance Method Details

#is_comment?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/twitter_cldr/transforms/comment_rule.rb', line 24

def is_comment?
  true
end