Class: Zeno::Application

Inherits:
Object
  • Object
show all
Defined in:
lib/zeno/application.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#archObject (readonly)

Returns the value of attribute arch.



23
24
25
# File 'lib/zeno/application.rb', line 23

def arch
  @arch
end

#dirnameObject (readonly)

Returns the value of attribute dirname.



23
24
25
# File 'lib/zeno/application.rb', line 23

def dirname
  @dirname
end

#etaos_pathObject (readonly)

Returns the value of attribute etaos_path.



23
24
25
# File 'lib/zeno/application.rb', line 23

def etaos_path
  @etaos_path
end

#libdirObject (readonly)

Returns the value of attribute libdir.



23
24
25
# File 'lib/zeno/application.rb', line 23

def libdir
  @libdir
end

#uploaderObject (readonly)

Returns the value of attribute uploader.



23
24
25
# File 'lib/zeno/application.rb', line 23

def uploader
  @uploader
end

Instance Method Details

#createObject



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

#generateObject



38
39
40
41
# File 'lib/zeno/application.rb', line 38

def generate
  generate_mkfile
  generate_kbuildfile
end