Class: Zeno::Application
- Inherits:
-
Object
- Object
- Zeno::Application
- Defined in:
- lib/zeno/application.rb
Instance Attribute Summary collapse
-
#arch ⇒ Object
readonly
Returns the value of attribute arch.
-
#dirname ⇒ Object
readonly
Returns the value of attribute dirname.
-
#etaos_path ⇒ Object
readonly
Returns the value of attribute etaos_path.
-
#libdir ⇒ Object
readonly
Returns the value of attribute libdir.
-
#uploader ⇒ Object
readonly
Returns the value of attribute uploader.
Instance Method Summary collapse
- #create ⇒ Object
- #generate ⇒ Object
-
#initialize(name, path, libdir, arch, upload = nil) ⇒ Application
constructor
A new instance of Application.
Constructor Details
#initialize(name, path, libdir, arch, upload = nil) ⇒ Application
Returns a new instance of Application.
25 26 27 28 29 30 31 |
# File 'lib/zeno/application.rb', line 25 def initialize(name, path, libdir, arch, upload = nil) @dirname = name @etaos_path = "../#{path}" @libdir = "#{libdir}/etaos" @arch = arch @uploader = upload end |
Instance Attribute Details
#arch ⇒ Object (readonly)
Returns the value of attribute arch.
23 24 25 |
# File 'lib/zeno/application.rb', line 23 def arch @arch end |
#dirname ⇒ Object (readonly)
Returns the value of attribute dirname.
23 24 25 |
# File 'lib/zeno/application.rb', line 23 def dirname @dirname end |
#etaos_path ⇒ Object (readonly)
Returns the value of attribute etaos_path.
23 24 25 |
# File 'lib/zeno/application.rb', line 23 def etaos_path @etaos_path end |
#libdir ⇒ Object (readonly)
Returns the value of attribute libdir.
23 24 25 |
# File 'lib/zeno/application.rb', line 23 def libdir @libdir end |
#uploader ⇒ Object (readonly)
Returns the value of attribute uploader.
23 24 25 |
# File 'lib/zeno/application.rb', line 23 def uploader @uploader end |
Instance Method Details
#create ⇒ Object
33 34 35 36 |
# File 'lib/zeno/application.rb', line 33 def create raise Zeno::ApplicationAlreadyExistsError if File.directory? @dirname FileUtils.mkdir_p @dirname end |
#generate ⇒ Object
38 39 40 41 |
# File 'lib/zeno/application.rb', line 38 def generate generate_mkfile generate_kbuildfile end |