lib/avm/result.rb in avm-tools-0.34.0 vs lib/avm/result.rb in avm-tools-0.35.0
- old
+ new
@@ -7,11 +7,11 @@
class Result < ::SimpleDelegator
include ::EacRubyUtils::Listable
lists.add_string :type, :success, :error, :neutral
- lists.type.values.each do |type|
+ lists.type.values.each do |type| # rubocop:disable Style/HashEachMethods
class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
def self.#{type}(value)
new(value, TYPE_#{type.upcase})
end
RUBY_EVAL
@@ -49,10 +49,10 @@
def type_color
self.class.const_get("type_#{type}_color".upcase)
end
- lists.type.values.each do |type|
+ lists.type.values.each do |type| # rubocop:disable Style/HashEachMethods
class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
def #{type}?
@type == '#{type}'
end
RUBY_EVAL