Class method all, located at https://github.com/bitex-la/static_models/blob/master/lib/static_models.rb#L113-L115 does this:
def all
values.values
end
values is a Hash object.
Hash#values (https://ruby-doc.org/core-3.1.0/Hash.html#method-i-values) Returns a new Array containing all values in self.
I think there is room for optimization here, given that other class methods such as find_by_code rely on all, and when this method is used in loops you can be instantiating the same objects over and over unintentionally.
Class method
all, located at https://github.com/bitex-la/static_models/blob/master/lib/static_models.rb#L113-L115 does this:valuesis aHashobject.Hash#values(https://ruby-doc.org/core-3.1.0/Hash.html#method-i-values) Returns a new Array containing all values in self.I think there is room for optimization here, given that other class methods such as
find_by_coderely onall, and when this method is used in loops you can be instantiating the same objects over and over unintentionally.