Class: Hemera::Generator::ObjCImageGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/hemera/source/meta/image/objc.rb

Instance Method Summary collapse

Constructor Details

#initialize(class_name, images) ⇒ ObjCImageGenerator

Returns a new instance of ObjCImageGenerator.



5
6
7
8
# File 'lib/hemera/source/meta/image/objc.rb', line 5

def initialize(class_name, images)
  @class_name = class_name
  @images = images
end

Instance Method Details

#implementent_fileObject



14
15
16
# File 'lib/hemera/source/meta/image/objc.rb', line 14

def implementent_file
  ERB.new(File.read(File.expand_path('template/image.m.erb', __dir__))).result(binding)
end

#interface_fileObject



10
11
12
# File 'lib/hemera/source/meta/image/objc.rb', line 10

def interface_file
  ERB.new(File.read(File.expand_path('template/image.h.erb', __dir__))).result(binding)
end