Class: HMap::Target::FrameworkEntry
- Inherits:
-
Object
- Object
- HMap::Target::FrameworkEntry
- Defined in:
- lib/hmap/framework/framework_vfs.rb
Overview
Each fremaework vfs informations
Instance Attribute Summary collapse
-
#app_build_dir ⇒ Object
readonly
Returns the value of attribute app_build_dir.
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
-
#headers_real_paths ⇒ Object
Returns the value of attribute headers_real_paths.
-
#modules_real_paths ⇒ Object
Returns the value of attribute modules_real_paths.
-
#platform ⇒ Object
readonly
Returns the value of attribute platform.
-
#project_temp_dir ⇒ Object
readonly
Returns the value of attribute project_temp_dir.
Class Method Summary collapse
- .new_entrys_from_configurations_platforms(configurations, platforms, name, framework_name, module_path, headers) ⇒ Object
- .new_from_configuration_platform(configuration, platform, name, framework_name) ⇒ Object
Instance Method Summary collapse
- #add_headers_modules(module_path, framework_name, headers) ⇒ Object
- #framework_moduler_path ⇒ Object
-
#initialize(configuration, platform, app_build_dir, project_temp_dir) ⇒ FrameworkEntry
constructor
A new instance of FrameworkEntry.
Constructor Details
#initialize(configuration, platform, app_build_dir, project_temp_dir) ⇒ FrameworkEntry
Returns a new instance of FrameworkEntry.
10 11 12 13 14 15 16 17 |
# File 'lib/hmap/framework/framework_vfs.rb', line 10 def initialize(configuration, platform, app_build_dir, project_temp_dir) @configuration = configuration @platform = platform @app_build_dir = app_build_dir @project_temp_dir = project_temp_dir @headers_real_paths = [] @modules_real_paths = [] end |
Instance Attribute Details
#app_build_dir ⇒ Object (readonly)
Returns the value of attribute app_build_dir.
7 8 9 |
# File 'lib/hmap/framework/framework_vfs.rb', line 7 def app_build_dir @app_build_dir end |
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
7 8 9 |
# File 'lib/hmap/framework/framework_vfs.rb', line 7 def configuration @configuration end |
#headers_real_paths ⇒ Object
Returns the value of attribute headers_real_paths.
8 9 10 |
# File 'lib/hmap/framework/framework_vfs.rb', line 8 def headers_real_paths @headers_real_paths end |
#modules_real_paths ⇒ Object
Returns the value of attribute modules_real_paths.
8 9 10 |
# File 'lib/hmap/framework/framework_vfs.rb', line 8 def modules_real_paths @modules_real_paths end |
#platform ⇒ Object (readonly)
Returns the value of attribute platform.
7 8 9 |
# File 'lib/hmap/framework/framework_vfs.rb', line 7 def platform @platform end |
#project_temp_dir ⇒ Object (readonly)
Returns the value of attribute project_temp_dir.
7 8 9 |
# File 'lib/hmap/framework/framework_vfs.rb', line 7 def project_temp_dir @project_temp_dir end |
Class Method Details
.new_entrys_from_configurations_platforms(configurations, platforms, name, framework_name, module_path, headers) ⇒ Object
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/hmap/framework/framework_vfs.rb', line 31 def self.new_entrys_from_configurations_platforms(configurations, platforms, name, framework_name, module_path, headers) effective_platforms = Utils.effective_platforms_names(platforms) configurations.flat_map do |configuration| effective_platforms.map do |platform| entry = new_from_configuration_platform(configuration, platform, name, framework_name) entry.add_headers_modules(module_path, framework_name, headers) entry end end end |
.new_from_configuration_platform(configuration, platform, name, framework_name) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/hmap/framework/framework_vfs.rb', line 23 def self.new_from_configuration_platform(configuration, platform, name, framework_name) dir = "#{configuration}-#{platform}" app_build_dir = File.join(PodsSpecification.instance.app_build_dir, dir, name, "#{framework_name}.framework") project_temp_dir = File.join(PodsSpecification.instance.project_temp_dir, dir, "#{name}.build") new(configuration, platform, app_build_dir, project_temp_dir) end |
Instance Method Details
#add_headers_modules(module_path, framework_name, headers) ⇒ Object
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/hmap/framework/framework_vfs.rb', line 42 def add_headers_modules(module_path, framework_name, headers) has_private_module = module_path.glob('module*.modulemap').length > 1 e_headers = ->(path, *names) { names.inject(Pathname(path)) { |e, n| e.join(n) } } @headers_real_paths += headers @headers_real_paths << e_headers.call(app_build_dir, 'Headers', "#{framework_name}-Swift.h") @modules_real_paths << e_headers.call(project_temp_dir, 'module.modulemap') return unless has_private_module @modules_real_paths << e_headers.call(entry.project_temp_dir, 'module.private.modulemap') end |
#framework_moduler_path ⇒ Object
19 20 21 |
# File 'lib/hmap/framework/framework_vfs.rb', line 19 def framework_moduler_path File.join(app_build_dir, 'Modules') end |