Class: Redbreast::TemplateGenerator::Color::ObjC
- Includes:
- ERB::Util
- Defined in:
- lib/redbreast/template_generators/colors/objc_colors_template_generator.rb
Overview
Used for creating colors in objective-c.
Instance Method Summary collapse
Methods inherited from ObjC
Instance Method Details
#h_template ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/redbreast/template_generators/colors/objc_colors_template_generator.rb', line 9 def h_template <<~TEMPLATE #import <UIKit/UIKit.h> //THIS FILE IS AUTOGENERATED, DO NOT EDIT BY HAND <%= generate_category('interface', 'UIColor', app_name) %> <%= generate_h_file_objc(names: asset_names, variable: '+ (UIColor *)%s;\n')%> @end TEMPLATE end |
#m_template ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/redbreast/template_generators/colors/objc_colors_template_generator.rb', line 21 def m_template <<~TEMPLATE #import <UIKit/UIKit.h> //THIS FILE IS AUTOGENERATED, DO NOT EDIT BY HAND <%= generate_category('implementation', 'UIColor', app_name) %> <%= generate_m_file_objc(names: asset_names, variable_declaration: '+ (UIColor *)%s\n{', variable_implementation: '\n\treturn [UIColor colorNamed:@"%s" inBundle:%s compatibleWithTraitCollection:nil];\n}\n', bundle_name: bundle) %> @end TEMPLATE end |