Sha256: ab8b0699e28572e6d2b2ad802998d79efafa2863ae1d24cbe027fb4edbf769ae

Contents?: true

Size: 797 Bytes

Versions: 6

Compression:

Stored size: 797 Bytes

Contents

require_relative '../swift_template_generator' 

module Redbreast
  module TemplateGenerator
    module Image
      # Used for creating images in swift.
      class Swift < TemplateGenerator::Swift
        include ERB::Util

        def template
          <<~TEMPLATE
            import UIKit

            // THIS FILE IS AUTOGENERATED, DO NOT EDIT BY HAND
            // swiftlint:disable file_length type_body_length line_length superfluous_disable_command extension_access_modifier
            <%= generate_extension('UIImage', app_name) %>
            <%= generate_file_swift(names: asset_names, variable: 'public static var %s: UIImage { return UIImage(named: "%s", in: %s, compatibleWith: nil)! }', bundle: bundle) %>
            }
          TEMPLATE
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
redbreast-1.4.2 lib/redbreast/template_generators/images/swift_images_template_generator.rb
redbreast-1.4.1 lib/redbreast/template_generators/images/swift_images_template_generator.rb
redbreast-1.4.0 lib/redbreast/template_generators/images/swift_images_template_generator.rb
redbreast-1.3.1 lib/redbreast/template_generators/images/swift_images_template_generator.rb
redbreast-1.3.0 lib/redbreast/template_generators/images/swift_images_template_generator.rb
redbreast-1.2.5 lib/redbreast/template_generators/images/swift_images_template_generator.rb