Class: IOSGen::Generator::Objc::ViewControllerFormatter
- Inherits:
-
Object
- Object
- IOSGen::Generator::Objc::ViewControllerFormatter
- Defined in:
- lib/ios_gen/generator/objc/view_controller_formatter.rb
Overview
Objective-C Formatter for ViewController
Instance Attribute Summary collapse
-
#header_file_name ⇒ Object
readonly
File Names.
-
#impl_file_name ⇒ Object
readonly
File Names.
-
#view_controller ⇒ Object
ViewController and ViewModel.
-
#view_model ⇒ Object
ViewController and ViewModel.
-
#view_model_formatter ⇒ Object
readonly
ViewModel Formatter.
Instance Method Summary collapse
- #generate(&block) ⇒ Object
-
#initialize(view_model_formatter = ViewModelFormatter.new) ⇒ ViewControllerFormatter
constructor
A new instance of ViewControllerFormatter.
Constructor Details
#initialize(view_model_formatter = ViewModelFormatter.new) ⇒ ViewControllerFormatter
Returns a new instance of ViewControllerFormatter.
13 14 15 |
# File 'lib/ios_gen/generator/objc/view_controller_formatter.rb', line 13 def initialize(view_model_formatter = ViewModelFormatter.new) @view_model_formatter = view_model_formatter end |
Instance Attribute Details
#header_file_name ⇒ Object (readonly)
File Names
9 10 11 |
# File 'lib/ios_gen/generator/objc/view_controller_formatter.rb', line 9 def header_file_name @header_file_name end |
#impl_file_name ⇒ Object (readonly)
File Names
9 10 11 |
# File 'lib/ios_gen/generator/objc/view_controller_formatter.rb', line 9 def impl_file_name @impl_file_name end |
#view_controller ⇒ Object
ViewController and ViewModel
7 8 9 |
# File 'lib/ios_gen/generator/objc/view_controller_formatter.rb', line 7 def view_controller @view_controller end |
#view_model ⇒ Object
ViewController and ViewModel
7 8 9 |
# File 'lib/ios_gen/generator/objc/view_controller_formatter.rb', line 7 def view_model @view_model end |
#view_model_formatter ⇒ Object (readonly)
ViewModel Formatter
11 12 13 |
# File 'lib/ios_gen/generator/objc/view_controller_formatter.rb', line 11 def view_model_formatter @view_model_formatter end |
Instance Method Details
#generate(&block) ⇒ Object
30 31 32 33 |
# File 'lib/ios_gen/generator/objc/view_controller_formatter.rb', line 30 def generate(&block) block.call(header_file_name, 'templates/objc/UIViewController.h.erb') block.call(impl_file_name, 'templates/objc/UIViewController.m.erb') end |