Class: Dressmaker

Inherits:
Object
  • Object
show all
Defined in:
lib/dressmaker.rb,
lib/dressmaker/configuration.rb,
lib/dressmaker/configuration/rule.rb,
lib/dressmaker/configuration/matcher.rb,
lib/dressmaker/configuration/file_rule.rb,
lib/dressmaker/configuration/delegators.rb,
lib/dressmaker/configuration/file_matcher.rb,
lib/dressmaker/configuration/directory_rule.rb,
lib/dressmaker/configuration/directory_matcher.rb

Defined Under Namespace

Classes: Configuration

Constant Summary collapse

@@description_writer =
$stdout

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source, destination) ⇒ Dressmaker

Returns a new instance of Dressmaker.



19
20
21
# File 'lib/dressmaker.rb', line 19

def initialize(source, destination)
  @source, @destination = source, destination
end

Instance Attribute Details

#destinationObject (readonly)

Returns the value of attribute destination.



7
8
9
# File 'lib/dressmaker.rb', line 7

def destination
  @destination
end

#sourceObject (readonly)

Returns the value of attribute source.



7
8
9
# File 'lib/dressmaker.rb', line 7

def source
  @source
end

Class Method Details

.description_writerObject



11
12
13
# File 'lib/dressmaker.rb', line 11

def self.description_writer
  @@description_writer
end

.inform(source, status) ⇒ Object



15
16
17
# File 'lib/dressmaker.rb', line 15

def self.inform(source, status)
  description_writer << "%40s : %s" % [source.name, status] << "\n"
end

Instance Method Details

#generate(options = nil) ⇒ Object



27
28
29
30
31
# File 'lib/dressmaker.rb', line 27

def generate(options = nil)
  create_destination
  copy_files_from_source
  run_configuration(options)
end

#nameObject



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

def name
  "Application generator"
end