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)


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

def initialize(node)
  @node = node
end

Instance Method Details

#comment?Boolean

Returns:

  • (Boolean)


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

def comment?
  indicator == '#'
end

#escape?Boolean

Returns:

  • (Boolean)


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

def escape?
  indicator == '%'
end