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) ⇒ Application

Returns a new instance of Application.



25
26
27
28
29
30
# File 'lib/zeno/application.rb', line 25

def initialize(name, path, libdir, arch)
  @dirname = name
  @etaos_path = "../#{path}"
  @libdir = libdir
  @arch = arch
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

Instance Method Details

#createObject



32
33
34
35
# File 'lib/zeno/application.rb', line 32

def create
  raise Zeno::ApplicationAlreadyExistsError if File.directory? @dirname
  FileUtils.mkdir_p @dirname
end

#generateObject



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

def generate
  generate_mkfile
  generate_kbuildfile
end