Class: Nidyx::ObjCModelBase

Inherits:
Mustache
  • Object
show all
Defined in:
lib/nidyx/objc/model_base.rb

Direct Known Subclasses

ObjCImplementation, ObjCInterface

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, options) ⇒ ObjCModelBase

Returns a new instance of ObjCModelBase.



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/nidyx/objc/model_base.rb', line 11

def initialize(name, options)
  @name = name
  @author = options[:author]
  @owner = options[:company]
  @project = options[:project]
  @comments = options[:comments]
  @json_model = options[:objc][:json_model] if options[:objc]
  @imports = []
  @class_forward_declarations = []
  @protocol_forward_declarations = []
  @protocol_declarations = []
  @protocol_declarations << name if @json_model
end

Instance Attribute Details

#authorObject

Returns the value of attribute author.



5
6
7
# File 'lib/nidyx/objc/model_base.rb', line 5

def author
  @author
end

#class_forward_declarationsObject

Returns the value of attribute class_forward_declarations.



5
6
7
# File 'lib/nidyx/objc/model_base.rb', line 5

def class_forward_declarations
  @class_forward_declarations
end

#commentsObject

Returns the value of attribute comments.



5
6
7
# File 'lib/nidyx/objc/model_base.rb', line 5

def comments
  @comments
end

#file_nameObject

Returns the value of attribute file_name.



5
6
7
# File 'lib/nidyx/objc/model_base.rb', line 5

def file_name
  @file_name
end

#importsObject

Returns the value of attribute imports.



5
6
7
# File 'lib/nidyx/objc/model_base.rb', line 5

def imports
  @imports
end

#json_modelObject

Returns the value of attribute json_model.



5
6
7
# File 'lib/nidyx/objc/model_base.rb', line 5

def json_model
  @json_model
end

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/nidyx/objc/model_base.rb', line 5

def name
  @name
end

#ownerObject

Returns the value of attribute owner.



5
6
7
# File 'lib/nidyx/objc/model_base.rb', line 5

def owner
  @owner
end

#projectObject

Returns the value of attribute project.



5
6
7
# File 'lib/nidyx/objc/model_base.rb', line 5

def project
  @project
end

#protocol_declarationsObject

Returns the value of attribute protocol_declarations.



5
6
7
# File 'lib/nidyx/objc/model_base.rb', line 5

def protocol_declarations
  @protocol_declarations
end

#protocol_forward_declarationsObject

Returns the value of attribute protocol_forward_declarations.



5
6
7
# File 'lib/nidyx/objc/model_base.rb', line 5

def protocol_forward_declarations
  @protocol_forward_declarations
end

Instance Method Details

#has_class_forward_declarations?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/nidyx/objc/model_base.rb', line 29

def has_class_forward_declarations?
  !self.class_forward_declarations.empty?
end

#has_imports?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/nidyx/objc/model_base.rb', line 25

def has_imports?
  !self.imports.empty?
end

#has_protocol_declarations?Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/nidyx/objc/model_base.rb', line 37

def has_protocol_declarations?
  !self.protocol_declarations.empty?
end

#has_protocol_forward_declarations?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/nidyx/objc/model_base.rb', line 33

def has_protocol_forward_declarations?
  !self.protocol_forward_declarations.empty?
end

#json_model?Boolean

Returns:

  • (Boolean)


45
46
47
# File 'lib/nidyx/objc/model_base.rb', line 45

def json_model?
  self.json_model
end

#no_owner?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/nidyx/objc/model_base.rb', line 41

def no_owner?
  !self.owner
end