Class: Pod::Command::Bdtransform::ToBinary
- Inherits:
-
Pod::Command::Bdtransform
- Object
- Pod::Command
- Pod::Command::Bdtransform
- Pod::Command::Bdtransform::ToBinary
- Defined in:
- lib/cocoapods-BDTransform/command/BDTransform/ToBinary.rb
Instance Method Summary collapse
-
#initialize(argv) ⇒ ToBinary
constructor
A new instance of ToBinary.
- #run ⇒ Object
- #validate! ⇒ Object
Constructor Details
#initialize(argv) ⇒ ToBinary
Returns a new instance of ToBinary.
54 55 56 57 58 |
# File 'lib/cocoapods-BDTransform/command/BDTransform/ToBinary.rb', line 54 def initialize(argv) @bd_transform_pod = argv.arguments end |
Instance Method Details
#run ⇒ Object
65 66 67 68 69 70 71 72 73 |
# File 'lib/cocoapods-BDTransform/command/BDTransform/ToBinary.rb', line 65 def run cdir = $WORK_DIR_Binary File::chmod(0777,"#{cdir}/AweToBinary") if $WORK_DIR_Binary == Dir.home() + '/.cocoapods-BDTransform' if !@bd_transform_pod.empty? string = @bd_transform_pod.to_s string = string.gsub("\"","").gsub("[","").gsub("]","").gsub(","," ") system("#{cdir}/AweToBinary #{string}") end end |
#validate! ⇒ Object
60 61 62 63 |
# File 'lib/cocoapods-BDTransform/command/BDTransform/ToBinary.rb', line 60 def validate! help! 'A Pod name is required.' unless @bd_transform_pod.count > 0 end |