Sha256: 3afcd447ec3d2d8810b2f3e4e59048acca53c95640cc774a6c6bb0ffc65034ad

Contents?: true

Size: 307 Bytes

Versions: 4

Compression:

Stored size: 307 Bytes

Contents

require 'technologist/rules/file_content_rule'

class GemRule < FileContentRule
  attr_accessor :gem_name

  def initialize(framework, attributes = {})
    super

    self.file_name = 'Gemfile'
    self.gem_name ||= framework.downcase
    self.file_content_pattern = /^\s*gem ["']#{gem_name}["']/
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
technologist-0.6.1 lib/technologist/rules/gem_rule.rb
technologist-0.6.0 lib/technologist/rules/gem_rule.rb
technologist-0.5.0 lib/technologist/rules/gem_rule.rb
technologist-0.4.0 lib/technologist/rules/gem_rule.rb