Sha256: eb39f9cf8168a22f5a64cbe2c1e91b0cf650239c01df1fca655a626e8d33a93c
Contents?: true
Size: 628 Bytes
Versions: 10
Compression:
Stored size: 628 Bytes
Contents
# frozen_string_literal: true module Panko class Attribute def self.create(name, alias_name: nil) alias_name = alias_name.to_s unless alias_name.nil? Attribute.new(name.to_s, alias_name) end def ==(attr) return name.to_sym == attr if attr.is_a? Symbol if attr.is_a? Panko::Attribute return name == attr.name && alias_name == attr.alias_name end super end def hash name.to_sym.hash end def eql?(attr) self.==(attr) end def inspect "<Panko::Attribute name=#{name.inspect} alias_name=#{alias_name.inspect}>" end end end
Version data entries
10 entries across 10 versions & 1 rubygems