Sha256: 45c43fba5c9918474c7e10f0e294e67cf46b67152c4a26b3b834d469d089a950

Contents?: true

Size: 262 Bytes

Versions: 7

Compression:

Stored size: 262 Bytes

Contents

module RailsAssist
  module RubyMutator
    def remove_superclass
      self.gsub! /(class\s+\w+\s*)<\s*(\w|::)+/, '\1'
    end
  
    def inherit_from superclass
      self.gsub! /(class\s+(\w|::)+)/, '\1' + " < #{superclass.to_s.camelize}\n"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rails_artifactor-0.5.1 lib/rails_artifactor/ruby_mutator.rb
rails_artifactor-0.5.0 lib/rails_artifactor/ruby_mutator.rb
rails_artifactor-0.4.0 lib/rails_artifactor/ruby_mutator.rb
rails_artifactor-0.3.6 lib/rails_artifactor/ruby_mutator.rb
rails_artifactor-0.3.5 lib/rails_artifactor/ruby_mutator.rb
rails_artifactor-0.3.4 lib/rails_artifactor/ruby_mutator.rb
rails_artifactor-0.3.3 lib/rails_artifactor/ruby_mutator.rb