Sha256: d85be650ef9b18b20573bce6fab3532d5d43fc5d7f60f40cd79921a1c72cf4b0

Contents?: true

Size: 998 Bytes

Versions: 14

Compression:

Stored size: 998 Bytes

Contents

# -*- encoding : utf-8 -*-
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

14 entries across 14 versions & 1 rubygems

Version Path
ib-1.0.1 lib/ib/generator/rendering_helper.rb
ib-1.0 lib/ib/generator/rendering_helper.rb
ib-0.8.0 lib/ib/generator/rendering_helper.rb
ib-0.7.2 lib/ib/generator/rendering_helper.rb
ib-0.7.1 lib/ib/generator/rendering_helper.rb
ib-0.7.0 lib/ib/generator/rendering_helper.rb
ib-0.6.0 lib/ib/generator/rendering_helper.rb
ib-0.5.0 lib/ib/generator/rendering_helper.rb
ib-0.4.9 lib/ib/generator/rendering_helper.rb
ib-0.4.8 lib/ib/generator/rendering_helper.rb
ib-0.4.7 lib/ib/generator/rendering_helper.rb
ib-0.4.6 lib/ib/generator/rendering_helper.rb
ib-0.4.5 lib/ib/generator/rendering_helper.rb
ib-0.4.4 lib/ib/generator/rendering_helper.rb