Class: Pod::ProjectRenamer

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-vemars/services/renamer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(oldname, newname) ⇒ ProjectRenamer

Returns a new instance of ProjectRenamer.



8
9
10
11
12
# File 'lib/cocoapods-vemars/services/renamer.rb', line 8

def initialize(oldname, newname)
  @oldname = oldname
  @newname = newname
  @processedPaths = []
end

Instance Attribute Details

#newnameObject (readonly)

Returns the value of attribute newname.



4
5
6
# File 'lib/cocoapods-vemars/services/renamer.rb', line 4

def newname
  @newname
end

#oldnameObject (readonly)

Returns the value of attribute oldname.



3
4
5
# File 'lib/cocoapods-vemars/services/renamer.rb', line 3

def oldname
  @oldname
end

#processedPaths=(value) ⇒ Object (writeonly)

Sets the attribute processedPaths

Parameters:

  • value

    the value to set the attribute processedPaths to.



6
7
8
# File 'lib/cocoapods-vemars/services/renamer.rb', line 6

def processedPaths=(value)
  @processedPaths = value
end

Instance Method Details

#executeObject



14
15
16
17
18
19
20
21
22
# File 'lib/cocoapods-vemars/services/renamer.rb', line 14

def execute
  path = Dir.pwd
  puts "#{path}"
  if validatePath(path)
    enumeratePath(path)
  else
    help! "Xcode project or workspace with name: #{@oldname} is not found in current path."
  end
end