Class: Referee::TableCell

Inherits:
Renderable show all
Defined in:
lib/referee/renderables/tablecell.rb

Overview

Renderable implementation for UITableViewCell identifiers embedded in storyboards.

Instance Attribute Summary

Attributes inherited from Renderable

#swift_type, #type

Instance Method Summary collapse

Methods inherited from Renderable

#bundle_accessor, #methodize_name, #simple_method_declaration, #simple_method_implementation, #simple_swift_method, #simple_swift_string_case, #swift_bundle_accessor

Constructor Details

#initialize(identifier) ⇒ TableCell

Returns a new instance of TableCell.



4
5
6
7
8
# File 'lib/referee/renderables/tablecell.rb', line 4

def initialize(identifier)
  @identifier = identifier
  @type = 'NSString *'
  @swift_type = 'String'
end

Instance Method Details

#declarationObject



10
11
12
# File 'lib/referee/renderables/tablecell.rb', line 10

def declaration
  simple_method_declaration @identifier
end

#implementationObject



14
15
16
# File 'lib/referee/renderables/tablecell.rb', line 14

def implementation
  simple_method_implementation @identifier, "@\"#{@identifier}\""
end

#swift_implementationObject



18
19
20
# File 'lib/referee/renderables/tablecell.rb', line 18

def swift_implementation
  simple_swift_string_case @identifier
end