Sha256: 5a632d07f7b7c02733b4a0ee0628fce099a0d96700a38d98729df8dfc940bd90
Contents?: true
Size: 544 Bytes
Versions: 1
Compression:
Stored size: 544 Bytes
Contents
# encoding: utf-8 module RailsBestPractices module Core class Methods def initialize @methods = {} end def add_method(model_name, method_name) @methods[model_name] ||= [] @methods[model_name] << method_name end def get_methods(model_name) @methods[model_name] ||= [] @methods[model_name].to_a end def has_method?(model_name, method_name) @methods[model_name] ||= [] @methods[model_name].include? method_name end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rails_best_practices-1.1.0 | lib/rails_best_practices/core/methods.rb |