Class: PodFileBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/plugin/pod_spec_generator/helper/pod_file_builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePodFileBuilder

Returns a new instance of PodFileBuilder.



10
11
12
13
14
15
16
# File 'lib/fastlane/plugin/pod_spec_generator/helper/pod_file_builder.rb', line 10

def initialize
  @use_frameworks = true
  @targets = []
  @apply_local_spm_fix = false
  @platform = nil
  @source_urls = []
end

Instance Attribute Details

#apply_local_spm_fix=(value) ⇒ Object (writeonly)

Sets the attribute apply_local_spm_fix

Parameters:

  • value

    the value to set the attribute apply_local_spm_fix to.



4
5
6
# File 'lib/fastlane/plugin/pod_spec_generator/helper/pod_file_builder.rb', line 4

def apply_local_spm_fix=(value)
  @apply_local_spm_fix = value
end

#platform=(value) ⇒ Object

Sets the attribute platform

Parameters:

  • value

    the value to set the attribute platform to.



4
5
6
# File 'lib/fastlane/plugin/pod_spec_generator/helper/pod_file_builder.rb', line 4

def platform=(value)
  @platform = value
end

#source_urls=(value) ⇒ Object (writeonly)

Sets the attribute source_urls

Parameters:

  • value

    the value to set the attribute source_urls to.



4
5
6
# File 'lib/fastlane/plugin/pod_spec_generator/helper/pod_file_builder.rb', line 4

def source_urls=(value)
  @source_urls = value
end

#targets=(value) ⇒ Object (writeonly)

Sets the attribute targets

Parameters:

  • value

    the value to set the attribute targets to.



4
5
6
# File 'lib/fastlane/plugin/pod_spec_generator/helper/pod_file_builder.rb', line 4

def targets=(value)
  @targets = value
end

#use_frameworks=(value) ⇒ Object (writeonly)

Sets the attribute use_frameworks

Parameters:

  • value

    the value to set the attribute use_frameworks to.



4
5
6
# File 'lib/fastlane/plugin/pod_spec_generator/helper/pod_file_builder.rb', line 4

def use_frameworks=(value)
  @use_frameworks = value
end

Instance Method Details

#build_pod_file_stringObject



18
19
20
21
22
23
24
25
26
# File 'lib/fastlane/plugin/pod_spec_generator/helper/pod_file_builder.rb', line 18

def build_pod_file_string
  [use_frameworks_string,
   custom_sources,
   platform,
   apply_local_spm_fix_string,
   targets_string,
  ].compact
   .join("\n")
end