asaaki/ryodo

View on GitHub
lib/ryodo/rule.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

module Ryodo
  Rule = Struct.new(:exception, :stop_ok, :children) do
    def children?
      !children.empty?
    end
    alias_method :has_children?, :children?

    def suffix?
      stop_ok
    end
    alias_method :is_suffix?, :suffix?
  end
end