Class: Compass::Commands::StampPattern

Inherits:
ProjectBase show all
Includes:
InstallerCommand
Defined in:
lib/compass/commands/stamp_pattern.rb

Direct Known Subclasses

CreateProject

Instance Attribute Summary

Attributes inherited from ProjectBase

#options, #project_name

Attributes inherited from Base

#options, #working_path

Attributes included from Actions

#logger

Instance Method Summary collapse

Methods included from InstallerCommand

#configure!, #installer, #installer_args

Methods inherited from ProjectBase

#execute

Methods inherited from Base

#execute

Methods included from Actions

#basename, #compile, #copy, #directory, #relativize, #remove, #separate, #strip_trailing_separator, #write_file

Constructor Details

#initialize(working_path, options) ⇒ StampPattern

Returns a new instance of StampPattern.



11
12
13
# File 'lib/compass/commands/stamp_pattern.rb', line 11

def initialize(working_path, options)
  super(working_path, options)
end

Instance Method Details

#is_project_creation?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/compass/commands/stamp_pattern.rb', line 23

def is_project_creation?
  false
end

#performObject

all commands must implement perform



16
17
18
19
20
21
# File 'lib/compass/commands/stamp_pattern.rb', line 16

def perform
  installer.init
  installer.run(:skip_finalization => true)
  UpdateProject.new(working_path, options).perform if installer.compilation_required?
  installer.finalize(:create => is_project_creation?)
end

#template_directory(pattern) ⇒ Object



27
28
29
# File 'lib/compass/commands/stamp_pattern.rb', line 27

def template_directory(pattern)
  File.join(framework.templates_directory, pattern)
end