Class: Pod::Command::Bdtransform::ToSource
- Inherits:
-
Pod::Command::Bdtransform
- Object
- Pod::Command
- Pod::Command::Bdtransform
- Pod::Command::Bdtransform::ToSource
- Defined in:
- lib/cocoapods-BDTransform/command/BDTransform/ToSource.rb
Instance Method Summary collapse
-
#initialize(argv) ⇒ ToSource
constructor
A new instance of ToSource.
- #run ⇒ Object
- #validate! ⇒ Object
Constructor Details
#initialize(argv) ⇒ ToSource
Returns a new instance of ToSource.
15 16 17 18 19 |
# File 'lib/cocoapods-BDTransform/command/BDTransform/ToSource.rb', line 15 def initialize(argv) @bd_transform_pod = argv.arguments end |
Instance Method Details
#run ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/cocoapods-BDTransform/command/BDTransform/ToSource.rb', line 26 def run cdir = File.dirname(__FILE__) if !@bd_transform_pod.empty? string = @bd_transform_pod.to_s string = string.gsub("\"","").gsub("[","").gsub("]","").gsub(","," ") system("#{cdir}/AweToSource #{string}") end end |
#validate! ⇒ Object
21 22 23 24 |
# File 'lib/cocoapods-BDTransform/command/BDTransform/ToSource.rb', line 21 def validate! help! 'A Pod name is required.' unless @bd_transform_pod.count > 0 end |