Class: RuboCop::Erb::RubyExtractor::ErbNode

Inherits:
Object
  • Object
show all
Defined in:
lib/rubocop/erb/ruby_extractor.rb

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ ErbNode

Returns a new instance of ErbNode.

Parameters:

  • node (BetterHtml::AST::Node)


101
102
103
# File 'lib/rubocop/erb/ruby_extractor.rb', line 101

def initialize(node)
  @node = node
end

Instance Method Details

#comment?Boolean

Returns:

  • (Boolean)


106
107
108
# File 'lib/rubocop/erb/ruby_extractor.rb', line 106

def comment?
  indicator == '#'
end

#escape?Boolean

Returns:

  • (Boolean)


111
112
113
# File 'lib/rubocop/erb/ruby_extractor.rb', line 111

def escape?
  indicator == '%'
end