Class: Framework::Tree
- Inherits:
-
Object
- Object
- Framework::Tree
- Defined in:
- lib/framework.rb
Instance Attribute Summary collapse
-
#headers_path ⇒ Object
readonly
Returns the value of attribute headers_path.
-
#resources_path ⇒ Object
readonly
Returns the value of attribute resources_path.
-
#root_path ⇒ Object
readonly
Returns the value of attribute root_path.
-
#versions_path ⇒ Object
readonly
Returns the value of attribute versions_path.
Instance Method Summary collapse
-
#initialize(name, platform, embedded) ⇒ Tree
constructor
A new instance of Tree.
- #make ⇒ Object
- #make_current_version ⇒ Object
- #make_framework ⇒ Object
- #make_headers ⇒ Object
- #make_resources ⇒ Object
- #make_root ⇒ Object
Constructor Details
#initialize(name, platform, embedded) ⇒ Tree
Returns a new instance of Tree.
8 9 10 11 12 |
# File 'lib/framework.rb', line 8 def initialize(name, platform, ) @name = name @platform = platform = end |
Instance Attribute Details
#headers_path ⇒ Object (readonly)
Returns the value of attribute headers_path.
3 4 5 |
# File 'lib/framework.rb', line 3 def headers_path @headers_path end |
#resources_path ⇒ Object (readonly)
Returns the value of attribute resources_path.
4 5 6 |
# File 'lib/framework.rb', line 4 def resources_path @resources_path end |
#root_path ⇒ Object (readonly)
Returns the value of attribute root_path.
5 6 7 |
# File 'lib/framework.rb', line 5 def root_path @root_path end |
#versions_path ⇒ Object (readonly)
Returns the value of attribute versions_path.
6 7 8 |
# File 'lib/framework.rb', line 6 def versions_path @versions_path end |
Instance Method Details
#make ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/framework.rb', line 14 def make make_root make_framework make_headers make_resources make_current_version end |
#make_current_version ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/framework.rb', line 24 def make_current_version current_version_path = @versions_path + Pathname.new('../Current') `ln -sf A #{current_version_path}` `ln -sf Versions/Current/Headers #{@fwk_path}/` `ln -sf Versions/Current/Resources #{@fwk_path}/` `ln -sf Versions/Current/#{@name} #{@fwk_path}/` end |
#make_framework ⇒ Object
32 33 34 35 36 37 |
# File 'lib/framework.rb', line 32 def make_framework @fwk_path = @root_path + Pathname.new(@name + '.framework') @fwk_path.mkdir unless @fwk_path.exist? @versions_path = @fwk_path + Pathname.new('Versions/A') end |
#make_headers ⇒ Object
39 40 41 42 |
# File 'lib/framework.rb', line 39 def make_headers @headers_path = @versions_path + Pathname.new('Headers') @headers_path.mkpath unless @headers_path.exist? end |
#make_resources ⇒ Object
44 45 46 47 |
# File 'lib/framework.rb', line 44 def make_resources @resources_path = @versions_path + Pathname.new('Resources') @resources_path.mkpath unless @resources_path.exist? end |
#make_root ⇒ Object
49 50 51 52 53 54 55 56 57 |
# File 'lib/framework.rb', line 49 def make_root @root_path = Pathname.new(@platform) if @root_path += Pathname.new(@name + '.embeddedframwork') end @root_path.mkpath unless @root_path.exist? end |