Sha256: f5b7629d1676fb5271261b748196348786297a3a91a7ec904c39f08f396ede14

Contents?: true

Size: 971 Bytes

Versions: 1

Compression:

Stored size: 971 Bytes

Contents

module IB
  class Generator
    class RenderingHelper

      def initialize(build_platform, files)
        @build_platform = build_platform
        @files = files
      end

      def ib_version
        IB::VERSION
      end

      def ios_project?
        @build_platform == :ios
      end

      def osx_project?
        @build_platform == :osx
      end

      def framework_headers
        headers = ''
        if defined?(Motion::Project::App.config.frameworks)
          Motion::Project::App.config.frameworks.each do |framework|
            headers << "\#import <#{framework}/#{framework}.h>\n"
          end
        else
          headers << "#import <Foundation/Foundation.h>\n"
          headers << "#import <CoreData/CoreData.h>\n"
          if ios_project?
            headers << "#import <UIKit/UIKit.h>\n"
          elsif osx_project?
            headers << "#import <Cocoa/Cocoa.h>\n"
          end
        end
        headers
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ib-0.4.3 lib/ib/generator/rendering_helper.rb