Class: Deveo::App

Inherits:
Object
  • Object
show all
Defined in:
lib/deveo/app.rb

Defined Under Namespace

Classes: Metadata

Constant Summary collapse

INITIAL_VERSION =
"0.0.1"

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ App

Returns a new instance of App.



16
17
18
19
20
# File 'lib/deveo/app.rb', line 16

def initialize(name)
  @name = name
  @path = "#{Dir.pwd}/#{name}"
  @meta = Metadata.new(@path)
end

Instance Attribute Details

#metaObject (readonly)

Returns the value of attribute meta.



14
15
16
# File 'lib/deveo/app.rb', line 14

def meta
  @meta
end

#nameObject (readonly)

Returns the value of attribute name.



14
15
16
# File 'lib/deveo/app.rb', line 14

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



14
15
16
# File 'lib/deveo/app.rb', line 14

def path
  @path
end

Class Method Details

.package(path) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/deveo/app.rb', line 6

def self.package(path)
  Zip::File.open("#{File.basename(path)}.zip", Zip::File::CREATE) do |zipfile|
    Dir[File.join(path, "**", "**")].each do |file|
      zipfile.add(file.sub(File.join(path, ""), ""), file)
    end
  end
end

Instance Method Details

#initObject



22
23
24
25
# File 'lib/deveo/app.rb', line 22

def init
  copy_skeleton
  
end