Class: Nidyx::ObjCImplementation
- Inherits:
-
ObjCModelBase
- Object
- Mustache
- ObjCModelBase
- Nidyx::ObjCImplementation
- Defined in:
- lib/nidyx/objc/implementation.rb
Instance Attribute Summary collapse
-
#name_overrides ⇒ Object
Returns the value of attribute name_overrides.
Attributes inherited from ObjCModelBase
#author, #class_forward_declarations, #comments, #file_name, #imports, #json_model, #name, #owner, #project, #protocol_declarations, #protocol_forward_declarations
Instance Method Summary collapse
-
#initialize(name, options) ⇒ ObjCImplementation
constructor
A new instance of ObjCImplementation.
- #name_override_string ⇒ Object
- #name_overrides? ⇒ Boolean
Methods inherited from ObjCModelBase
#has_class_forward_declarations?, #has_imports?, #has_protocol_declarations?, #has_protocol_forward_declarations?, #json_model?, #no_owner?
Constructor Details
#initialize(name, options) ⇒ ObjCImplementation
Returns a new instance of ObjCImplementation.
9 10 11 12 13 |
# File 'lib/nidyx/objc/implementation.rb', line 9 def initialize(name, ) super self.file_name = "#{name}.#{EXT}" self.imports = [name] end |
Instance Attribute Details
#name_overrides ⇒ Object
Returns the value of attribute name_overrides.
7 8 9 |
# File 'lib/nidyx/objc/implementation.rb', line 7 def name_overrides @name_overrides end |
Instance Method Details
#name_override_string ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/nidyx/objc/implementation.rb', line 19 def name_override_string string = "" count = 0 name_overrides.each do |original, override| count += 1 string += "@\"#{original}\": @\"#{override}\"" string += ",\n" unless count == name_overrides.length end string end |
#name_overrides? ⇒ Boolean
15 16 17 |
# File 'lib/nidyx/objc/implementation.rb', line 15 def name_overrides? !self.name_overrides.empty? end |