Class: Redbreast::TemplateGenerator::Image::Swift

Inherits:
Swift
  • Object
show all
Includes:
ERB::Util
Defined in:
lib/redbreast/template_generators/images/swift_images_template_generator.rb

Overview

Used for creating images in swift.

Instance Method Summary collapse

Instance Method Details

#templateObject



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/redbreast/template_generators/images/swift_images_template_generator.rb', line 10

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