Sha256: a9ff78f41502df196f7d48eb06fa0c07eca909d19c6be1ac5e7ee0876cdf62d2
Contents?: true
Size: 1.19 KB
Versions: 1
Compression:
Stored size: 1.19 KB
Contents
// // Generated by CocoaPods-Keys // on <%= @time.strftime("%d/%m/%Y") %> // For more information see https://github.com/orta/cocoapods-keys // #import <Foundation/NSDictionary.h> #import "<%= @name %>.h" @interface <%= @name %> () <% @keys.each do |key, value| %>@property (nonatomic, copy) NSString *<%= key %>; <% end %> @end @implementation <%= @name %> - (instancetype)init { if (!(self = [super init])) { return nil; } <% @keys.each do |key, value| %> char <%= key %>CString[<%= @indexed_keys[key].length + 1 %>] = { <%= key_data_arrays[key] %>, '\0' }; _<%= key %> = <% if @indexed_keys.length > 0 %> <% if @indexed_keys[key].length > 0 %> [NSString stringWithCString:<%= key %>CString encoding:NSUTF8StringEncoding]; <% else %> @""; <% end %> <% else %> @""; <% end %> <% end %> return self; } static NSString *<%= name %>Data = @"<%= @data.gsub('\\', '\\\\\\').gsub('"', '\\"') if @data %>"; - (NSString *)description { return [@{ <%- @keys.each do |key, value| -%> @"<%= key %>": self.<%= key %>, <%- end -%> } description]; } - (id)debugQuickLookObject { return [self description]; } @end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cocoapods-keys-2.2.0 | templates/Keys.m.erb |