Class: Picon::Generator

Inherits:
Object
  • Object
show all
Defined in:
lib/picon/generator.rb

Constant Summary collapse

RESOLUTIONS_LIST_PATH =
File.expand_path("./resolutions.yml", __dir__)

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Generator

Returns a new instance of Generator.



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/picon/generator.rb', line 15

def initialize(args = {})
  if args[:current_path]
    @current_path = Pathname.new(File.expand_path(args[:current_path]))
  else
    @current_path = Pathname.pwd
  end

  @product_name = get_product_name
  @appiconset_path = get_appiconset_path
  @bundle_identifier = get_bundle_identifier
end

Class Method Details

.runObject



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

def self.run
  new.run
end

Instance Method Details

#runObject



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

def run
  generate_identicons
  generate_contents_json
  edit_project_pbxproj
end