Sha256: f18641dc467e834cecb8cb006db96591e23a3b1f49868dcfa5198d2201833928
Contents?: true
Size: 425 Bytes
Versions: 3
Compression:
Stored size: 425 Bytes
Contents
# frozen_string_literal: true module RailsBase class RequestLink attr_accessor :link, :text def self.add(link:, text:) return false if items.any? { _1.text == text } items << new(link:, text:) true end def self.items @array ||= [] end def self.any? items.length > 0 end def initialize(link:, text:) @link = link @text = text end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rails_base-0.82.0 | lib/rails_base/request_link.rb |
rails_base-0.81.1 | lib/rails_base/request_link.rb |
rails_base-0.81.0 | lib/rails_base/request_link.rb |