Class: HMap::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/hmap/xc/context.rb

Direct Known Subclasses

Target::TargetContext

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(build_root, temp_dir, hmap_root, temp_name, build_dir) ⇒ Context

Returns a new instance of Context.



7
8
9
10
11
12
13
# File 'lib/hmap/xc/context.rb', line 7

def initialize(build_root, temp_dir, hmap_root, temp_name, build_dir)
  @build_root = build_root
  @temp_dir = temp_dir
  @hmap_root = hmap_root
  @temp_name = temp_name
  @build_dir = build_dir || ''
end

Instance Attribute Details

#build_dirObject (readonly)

Returns the value of attribute build_dir.



5
6
7
# File 'lib/hmap/xc/context.rb', line 5

def build_dir
  @build_dir
end

#build_rootObject (readonly)

Returns the value of attribute build_root.



5
6
7
# File 'lib/hmap/xc/context.rb', line 5

def build_root
  @build_root
end

#hmap_rootObject (readonly)

Returns the value of attribute hmap_root.



5
6
7
# File 'lib/hmap/xc/context.rb', line 5

def hmap_root
  @hmap_root
end

#temp_dirObject (readonly)

Returns the value of attribute temp_dir.



5
6
7
# File 'lib/hmap/xc/context.rb', line 5

def temp_dir
  @temp_dir
end

#temp_nameObject (readonly)

Returns the value of attribute temp_name.



5
6
7
# File 'lib/hmap/xc/context.rb', line 5

def temp_name
  @temp_name
end

Instance Method Details

#build_path(platform) ⇒ Object



15
16
17
# File 'lib/hmap/xc/context.rb', line 15

def build_path(platform)
  File.join(build_root, platform.to_s, build_dir)
end

#temp_path(platform) ⇒ Object



19
20
21
# File 'lib/hmap/xc/context.rb', line 19

def temp_path(platform)
  File.join(temp_dir, platform.to_s, temp_name)
end