Class: KCommercial::Resources::OCFileModel
- Inherits:
-
Object
- Object
- KCommercial::Resources::OCFileModel
- Defined in:
- lib/KCommercialPipeline/core/resource/objective-c/oc_file_model.rb
Instance Attribute Summary collapse
-
#header ⇒ Object
Returns the value of attribute header.
-
#implementation ⇒ Object
Returns the value of attribute implementation.
Class Method Summary collapse
- .colors_model ⇒ Object
- .file_model_for_type(type) ⇒ Object
- .files_model ⇒ Object
- .fonts_model ⇒ Object
- .i18ns_model ⇒ Object
- .images_model ⇒ Object
- .main_model ⇒ Object
- .public_header ⇒ Object
- .public_model ⇒ Object
- .templates_root ⇒ Object
Instance Method Summary collapse
-
#initialize(header_name, imp_name) ⇒ OCFileModel
constructor
A new instance of OCFileModel.
Constructor Details
#initialize(header_name, imp_name) ⇒ OCFileModel
Returns a new instance of OCFileModel.
52 53 54 55 |
# File 'lib/KCommercialPipeline/core/resource/objective-c/oc_file_model.rb', line 52 def initialize(header_name, imp_name) @header = OCFileModel.templates_root.join(header_name) if header_name @implementation = OCFileModel.templates_root.join(imp_name) if imp_name end |
Instance Attribute Details
#header ⇒ Object
Returns the value of attribute header.
5 6 7 |
# File 'lib/KCommercialPipeline/core/resource/objective-c/oc_file_model.rb', line 5 def header @header end |
#implementation ⇒ Object
Returns the value of attribute implementation.
6 7 8 |
# File 'lib/KCommercialPipeline/core/resource/objective-c/oc_file_model.rb', line 6 def implementation @implementation end |
Class Method Details
.colors_model ⇒ Object
42 43 44 |
# File 'lib/KCommercialPipeline/core/resource/objective-c/oc_file_model.rb', line 42 def colors_model file_model_for_type('Colors') end |
.file_model_for_type(type) ⇒ Object
46 47 48 49 |
# File 'lib/KCommercialPipeline/core/resource/objective-c/oc_file_model.rb', line 46 def file_model_for_type(type) OCFileModel.new("{{oc_class_name}}+#{type}.h", "{{oc_class_name}}+#{type}.m") end |
.files_model ⇒ Object
38 39 40 |
# File 'lib/KCommercialPipeline/core/resource/objective-c/oc_file_model.rb', line 38 def files_model file_model_for_type('Files') end |
.fonts_model ⇒ Object
30 31 32 |
# File 'lib/KCommercialPipeline/core/resource/objective-c/oc_file_model.rb', line 30 def fonts_model file_model_for_type('Fonts') end |
.i18ns_model ⇒ Object
26 27 28 |
# File 'lib/KCommercialPipeline/core/resource/objective-c/oc_file_model.rb', line 26 def i18ns_model file_model_for_type('I18ns') end |
.images_model ⇒ Object
34 35 36 |
# File 'lib/KCommercialPipeline/core/resource/objective-c/oc_file_model.rb', line 34 def images_model file_model_for_type('Images') end |
.main_model ⇒ Object
21 22 23 24 |
# File 'lib/KCommercialPipeline/core/resource/objective-c/oc_file_model.rb', line 21 def main_model OCFileModel.new('{{oc_class_name}}.h', '{{oc_class_name}}.m') end |
.public_header ⇒ Object
13 14 15 |
# File 'lib/KCommercialPipeline/core/resource/objective-c/oc_file_model.rb', line 13 def public_header templates_root.join('{{component_header_name}}.h') end |
.public_model ⇒ Object
17 18 19 |
# File 'lib/KCommercialPipeline/core/resource/objective-c/oc_file_model.rb', line 17 def public_model OCFileModel.new('{{component_header_name}}.h', nil) end |
.templates_root ⇒ Object
9 10 11 |
# File 'lib/KCommercialPipeline/core/resource/objective-c/oc_file_model.rb', line 9 def templates_root Pathname(__FILE__).parent.join('templates') end |