Sha256: e9e0a1e5f3f72c0bdad0a5b3b963917752fcf36228669b5753ec9611d6e0500d

Contents?: true

Size: 893 Bytes

Versions: 13

Compression:

Stored size: 893 Bytes

Contents

# ==========================================================================
# Generator: Model
# Copyright: ©2006-2009 Sprout Systems, Inc. and contributors
#            portions copyright ©2009 Apple, Inc.
# ==========================================================================

namespace :generator do

  # - Verify required properties are present. 
  # - If class_name & method_name is passed, add it to the filename.
  # - If second param is passed, use it as the filename
  task :prepare do
    GENERATOR.requires! :target_project, :target, :namespace
    
    class_name = GENERATOR.class_name
    method_name = GENERATOR.method_name
    if class_name && method_name
      GENERATOR.filename = GENERATOR.snake_case(class_name) / GENERATOR.snake_case(method_name)
    end
    
    arguments = GENERATOR.arguments
    GENERATOR.filename = arguments[2] if arguments[2]
  end
  
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
sproutit-sproutcore-1.0.0.20090407205609 gen/test/Buildfile
sproutit-sproutcore-1.0.0.20090408130025 gen/test/Buildfile
sproutit-sproutcore-1.0.0.20090416161445 gen/test/Buildfile
sproutit-sproutcore-1.0.0.20090720093355 gen/test/Buildfile
sproutit-sproutcore-1.0.0.20090720202429 gen/test/Buildfile
sproutit-sproutcore-1.0.0.20090721125122 gen/test/Buildfile
sproutit-sproutcore-1.0.126 gen/test/Buildfile
sproutit-sproutcore-1.0.20090721145236 gen/test/Buildfile
sproutit-sproutcore-1.0.20090721145251 gen/test/Buildfile
sproutit-sproutcore-1.0.20090721145280 gen/test/Buildfile
sproutit-sproutcore-1.0.20090721145281 gen/test/Buildfile
sproutit-sproutcore-1.0.20090721145282 gen/test/Buildfile
sproutit-sproutcore-1.0.203 gen/test/Buildfile