Top Level Namespace

Defined Under Namespace

Modules: Highlander

Constant Summary collapse

LOCAL_HIGHLANDER_CACHE_LOCATION =
"#{ENV['HOME']}/.highlander/components"

Instance Method Summary collapse

Instance Method Details

#HighlanderComponent(&block) ⇒ Object



394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
# File 'lib/highlander.dsl.rb', line 394

def HighlanderComponent(&block)
  instance = Highlander::Dsl::Template.new

  puts "Processing higlander component #{@name}\n\tLocation:#{@highlander_dsl_path}" +
      "\n\tConfig:#{@config}"

  component_config = @config

  instance.config = @config

  @mappings.each do |key, val|
    instance.addMapping(key, val)
  end

  unless @version.nil?
    instance.version = @version
  end

  unless @distribution_bucket.nil?
    instance.DistributionBucket(@distribution_bucket)
  end
  unless @distribution_prefix.nil?
    instance.DistributionPrefix(@distribution_prefix)
  end

  instance.instance_eval(&block)
  if instance.name.nil?
    instance.name = @name
  end

  # load sub-components
  instance.loadComponents

  return instance
end