Class: Pod::Generator::CopyResourcesScript
- Inherits:
-
Object
- Object
- Pod::Generator::CopyResourcesScript
- Defined in:
- lib/cocoapods/generator/copy_resources_script.rb
Instance Attribute Summary collapse
-
#platform ⇒ Platform
readonly
The platform of the library for which the copy resources script is needed.
-
#resources_by_config ⇒ Hash{String, Array{String}] A list of files relative to the project pods root, keyed by build configuration.
readonly
HashArray{String] A list of files relative to the project pods root, keyed by build configuration.
Instance Method Summary collapse
-
#initialize(resources_by_config, platform) ⇒ CopyResourcesScript
constructor
Initialize a new instance.
-
#save_as(pathname) ⇒ void
Saves the resource script to the given pathname.
Constructor Details
#initialize(resources_by_config, platform) ⇒ CopyResourcesScript
Initialize a new instance
24 25 26 27 |
# File 'lib/cocoapods/generator/copy_resources_script.rb', line 24 def initialize(resources_by_config, platform) @resources_by_config = resources_by_config @platform = platform end |
Instance Attribute Details
#platform ⇒ Platform (readonly)
Returns The platform of the library for which the copy resources script is needed.
14 15 16 |
# File 'lib/cocoapods/generator/copy_resources_script.rb', line 14 def platform @platform end |
#resources_by_config ⇒ Hash{String, Array{String}] A list of files relative to the project pods root, keyed by build configuration. (readonly)
Returns HashArray{String] A list of files relative to the project pods root, keyed by build configuration.
9 10 11 |
# File 'lib/cocoapods/generator/copy_resources_script.rb', line 9 def resources_by_config @resources_by_config end |
Instance Method Details
#save_as(pathname) ⇒ void
This method returns an undefined value.
Saves the resource script to the given pathname.
36 37 38 39 40 41 |
# File 'lib/cocoapods/generator/copy_resources_script.rb', line 36 def save_as(pathname) pathname.open('w') do |file| file.puts(script) end File.chmod(0755, pathname.to_s) end |