Module: ProjectGen::ProductHelper

Included in:
Product
Defined in:
lib/cocoapods-project-gen/gen/product/product_helper.rb

Instance Method Summary collapse

Instance Method Details

#build_as_framework?Boolean

Returns:

  • (Boolean)


45
46
47
# File 'lib/cocoapods-project-gen/gen/product/product_helper.rb', line 45

def build_as_framework?
  target.build_as_framework?
end

#build_as_library?Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/cocoapods-project-gen/gen/product/product_helper.rb', line 37

def build_as_library?
  target.build_as_library?
end

#file_accessorsObject



65
66
67
# File 'lib/cocoapods-project-gen/gen/product/product_helper.rb', line 65

def file_accessors
  target.file_accessors
end

#labelObject



20
21
22
# File 'lib/cocoapods-project-gen/gen/product/product_helper.rb', line 20

def label
  target.label
end

#module_basenameObject



49
50
51
# File 'lib/cocoapods-project-gen/gen/product/product_helper.rb', line 49

def module_basename 
  Pod::Specification.root_name(pod_name)
end

#pod_dirObject



32
33
34
35
# File 'lib/cocoapods-project-gen/gen/product/product_helper.rb', line 32

def pod_dir
  root_name = module_basename
  sandbox.sources_root + root_name
end

#pod_nameObject



57
58
59
# File 'lib/cocoapods-project-gen/gen/product/product_helper.rb', line 57

def pod_name
  target.pod_name
end

#product_nameObject



53
54
55
# File 'lib/cocoapods-project-gen/gen/product/product_helper.rb', line 53

def product_name
  target.product_name
end

#product_pathObject



85
86
87
# File 'lib/cocoapods-project-gen/gen/product/product_helper.rb', line 85

def product_path
  product_root.join("#{module_basename}-#{product_type}-#{version}")
end

#product_typeObject



61
62
63
# File 'lib/cocoapods-project-gen/gen/product/product_helper.rb', line 61

def product_type
  target.product_type
end

#root_specObject



81
82
83
# File 'lib/cocoapods-project-gen/gen/product/product_helper.rb', line 81

def root_spec
  target.root_spec
end

#sandboxObject



69
70
71
# File 'lib/cocoapods-project-gen/gen/product/product_helper.rb', line 69

def sandbox
  target.sandbox
end

#scope_suffixObject



24
25
26
# File 'lib/cocoapods-project-gen/gen/product/product_helper.rb', line 24

def scope_suffix
  target.scope_suffix
end

#static_library_nameObject



28
29
30
# File 'lib/cocoapods-project-gen/gen/product/product_helper.rb', line 28

def static_library_name
  "lib#{Utils.remove_target_scope_suffix(label, scope_suffix)}.a"
end

#uses_swift?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/cocoapods-project-gen/gen/product/product_helper.rb', line 41

def uses_swift?
  target.uses_swift?
end

#versionObject



16
17
18
# File 'lib/cocoapods-project-gen/gen/product/product_helper.rb', line 16

def version
  root_spec.version
end

#xcframework_nameObject



77
78
79
# File 'lib/cocoapods-project-gen/gen/product/product_helper.rb', line 77

def xcframework_name
  pod_name
end

#xcframework_product_nameObject



73
74
75
# File 'lib/cocoapods-project-gen/gen/product/product_helper.rb', line 73

def xcframework_product_name
  "#{xcframework_name}.xcframework"
end

#xcframework_product_pathObject



89
90
91
# File 'lib/cocoapods-project-gen/gen/product/product_helper.rb', line 89

def xcframework_product_path
  product_path.join(xcframework_product_name)
end