Class: Resources::Writer

Inherits:
Object
  • Object
show all
Defined in:
lib/robjc/writer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resources) ⇒ Writer

Returns a new instance of Writer.



9
10
11
# File 'lib/robjc/writer.rb', line 9

def initialize(resources)
  @resources = resources
end

Instance Attribute Details

#generated_atObject

Returns the value of attribute generated_at.



6
7
8
# File 'lib/robjc/writer.rb', line 6

def generated_at
  @generated_at
end

#resourcesObject

Returns the value of attribute resources.



7
8
9
# File 'lib/robjc/writer.rb', line 7

def resources
  @resources
end

Instance Method Details

#add_to_target(target) ⇒ Object



21
22
23
24
# File 'lib/robjc/writer.rb', line 21

def add_to_target(target)
  references = [ header_file_reference, implementation_file_reference ]
  target.add_file_references
end

#writeObject



13
14
15
16
17
18
19
# File 'lib/robjc/writer.rb', line 13

def write
  @generated_at = Time.now
  ensure_directory
  write_resources_class
  write_images_class
  write_strings_class
end