Roodi::Checks::NameCheck

Public Class Methods

new(interesting_nodes, pattern, message_prefix) click to toggle source
# File lib/roodi/checks/name_check.rb, line 6
def initialize(interesting_nodes, pattern, message_prefix)
  super()
  @interesting_nodes = interesting_nodes
  @pattern = pattern
  @message_prefix = message_prefix
end

Public Instance Methods

evaluate_start(node) click to toggle source
# File lib/roodi/checks/name_check.rb, line 17
def evaluate_start(node)
  name = find_name(node)
  add_error "#{@message_prefix} name \"#{name}\" should match pattern #{@pattern.inspect}" unless name.to_s =~ @pattern
end
interesting_nodes() click to toggle source
# File lib/roodi/checks/name_check.rb, line 13
def interesting_nodes
  @interesting_nodes
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.