Class: KCommercial::Resources::CodeModel

Inherits:
Object
  • Object
show all
Defined in:
lib/KCommercialPipeline/core/resource/objective-c/code_model.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#component_nameObject

Returns the value of attribute component_name.



7
8
9
# File 'lib/KCommercialPipeline/core/resource/objective-c/code_model.rb', line 7

def component_name
  @component_name
end

#keysObject

Returns the value of attribute keys.



7
8
9
# File 'lib/KCommercialPipeline/core/resource/objective-c/code_model.rb', line 7

def keys
  @keys
end

#resources_statusObject

Returns the value of attribute resources_status.



7
8
9
# File 'lib/KCommercialPipeline/core/resource/objective-c/code_model.rb', line 7

def resources_status
  @resources_status
end

#super_module_nameObject

Returns the value of attribute super_module_name.



7
8
9
# File 'lib/KCommercialPipeline/core/resource/objective-c/code_model.rb', line 7

def super_module_name
  @super_module_name
end

Instance Method Details

#bundle_nameObject



28
29
30
31
32
33
34
# File 'lib/KCommercialPipeline/core/resource/objective-c/code_model.rb', line 28

def bundle_name
  if component_name.end_with? "Resources"
    return  "Auto#{component_name}"
  else
    "Auto#{component_name}Resources"
  end
end

#component_header_nameObject



23
24
25
26
# File 'lib/KCommercialPipeline/core/resource/objective-c/code_model.rb', line 23

def component_header_name
  name = "#{component_name}Auto"
  name
end

#get_bindingObject



44
45
46
# File 'lib/KCommercialPipeline/core/resource/objective-c/code_model.rb', line 44

def get_binding
  binding
end

#key_to_function_name(key) ⇒ Object



36
37
38
39
40
41
42
# File 'lib/KCommercialPipeline/core/resource/objective-c/code_model.rb', line 36

def key_to_function_name(key)
  key = key.camelize(false)
  if key.length > 0
    key[0] = key[0].downcase
  end
  key
end

#oc_class_nameObject



9
10
11
12
13
# File 'lib/KCommercialPipeline/core/resource/objective-c/code_model.rb', line 9

def oc_class_name
  name = component_name
  name = "#{component_name}Resources" unless component_name.end_with? "Resources"
  "#{name}Internal"
end

#super_class_nameObject



15
16
17
18
19
20
21
# File 'lib/KCommercialPipeline/core/resource/objective-c/code_model.rb', line 15

def super_class_name
  name = "#{super_module_name}Internal"
  if super_module_name.to_s == "KCSemanticResources"
    name = "KCResources"
  end
  name
end