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.



9
10
11
12
13
14
15
16
17
# File 'lib/nidyx/objc/model_base.rb', line 9

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 = []
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

#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

Instance Method Details

#has_imports?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/nidyx/objc/model_base.rb', line 19

def has_imports?
  !self.imports.empty?
end

#json_model?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/nidyx/objc/model_base.rb', line 27

def json_model?
  self.json_model
end

#no_owner?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/nidyx/objc/model_base.rb', line 23

def no_owner?
  !self.owner
end