class SwingSet::FrameworkDirectory

Will add frameworks to a given swingset

Public Class Methods

carthage_frameworks(swingset, platform = :ios) click to toggle source
# File lib/swingset/framework_directory.rb, line 10
def self.carthage_frameworks(swingset, platform = :ios)
  path = File.join('Carthage', 'Build')
  if platform == :ios
    path = File.join(path, 'iOS')
  elsif platform == :osx
    path = File.join(path, 'Mac')
  else
    return
  end
  FrameworkDirectory.new(swingset, path)
end
new(swingset, framework_path) click to toggle source
# File lib/swingset/framework_directory.rb, line 5
def initialize(swingset, framework_path)
  @swingset = swingset
  add_frameworks_from_path(framework_path)
end

Public Instance Methods

add_framework_path(path) click to toggle source
# File lib/swingset/framework_directory.rb, line 22
def add_framework_path(path)
  add_frameworks_from_path(path) if Dir.exist?(path)
end

Private Instance Methods

add_frameworks_from_path(path) click to toggle source
# File lib/swingset/framework_directory.rb, line 28
def add_frameworks_from_path(path)
  fw_glob = File.join(path, '*.framework')
  Dir.glob(fw_glob).each do |framework|
    @swingset.add_framework(framework)
  end
end