Class: Objc::Test::SourceFiles

Inherits:
Object
  • Object
show all
Defined in:
lib/objc/source_files.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(prefix) ⇒ SourceFiles

Returns a new instance of SourceFiles.



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

def initialize(prefix)
  @prefix = prefix
end

Instance Attribute Details

#prefixObject (readonly)

Returns the value of attribute prefix.



9
10
11
# File 'lib/objc/source_files.rb', line 9

def prefix
  @prefix
end

Instance Method Details

#dataObject



35
36
37
38
39
# File 'lib/objc/source_files.rb', line 35

def data
  [ { 'name' => source_file, 'path' => source_file_path },
    { 'name' => header_file, 'path' => header_file_path },
    { 'name' => test_file, 'path' => test_file_path } ]
end

#header_fileObject



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

def header_file
  "#{prefix}.h"
end

#header_file_pathObject



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

def header_file_path
  File.expand_path(header_file)
end

#source_fileObject



11
12
13
# File 'lib/objc/source_files.rb', line 11

def source_file
  "#{prefix}.m"
end

#source_file_pathObject



15
16
17
# File 'lib/objc/source_files.rb', line 15

def source_file_path
  File.expand_path(source_file)
end

#test_fileObject



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

def test_file
  "#{prefix}Test.m"
end

#test_file_pathObject



31
32
33
# File 'lib/objc/source_files.rb', line 31

def test_file_path
  File.expand_path(test_file)
end