Class: HMap::Context
- Inherits:
-
Object
- Object
- HMap::Context
- Defined in:
- lib/hmap/xc/context.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#build_dir ⇒ Object
readonly
Returns the value of attribute build_dir.
-
#build_root ⇒ Object
readonly
Returns the value of attribute build_root.
-
#hmap_root ⇒ Object
readonly
Returns the value of attribute hmap_root.
-
#temp_dir ⇒ Object
readonly
Returns the value of attribute temp_dir.
-
#temp_name ⇒ Object
readonly
Returns the value of attribute temp_name.
Instance Method Summary collapse
- #build_path(platform) ⇒ Object
-
#initialize(build_root, temp_dir, hmap_root, temp_name, build_dir) ⇒ Context
constructor
A new instance of Context.
- #temp_path(platform) ⇒ Object
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_dir ⇒ Object (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_root ⇒ Object (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_root ⇒ Object (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_dir ⇒ Object (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_name ⇒ Object (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 |