Sha256: aa8a269a7a0909278315851ac737533136d90f449fca8f0a4652a445d2a586fa
Contents?: true
Size: 384 Bytes
Versions: 9
Compression:
Stored size: 384 Bytes
Contents
module Gitlab module Styles module Rubocop module ModelHelpers # Returns true if the given node originated from the models directory. def in_model?(node) path = node.location.expression.source_buffer.name models_path = File.join(Dir.pwd, 'app', 'models') path.start_with?(models_path) end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems