Class: CapicuaGen::Balthazar::AndyWebRequestFeature

Inherits:
TemplateFeature
  • Object
show all
Includes:
CapicuaGen, CapicuaGen::Balthazar
Defined in:
lib/CapicuaGenBalthazar/Web/AndyWebRequest/Source/andy_web_request_feature.rb

Overview

Caracteristica generadora para el uso de servicios json

Instance Method Summary collapse

Constructor Details

#initialize(values = {}) ⇒ AndyWebRequestFeature

Inicializa la caracteristica



39
40
41
42
43
44
45
46
# File 'lib/CapicuaGenBalthazar/Web/AndyWebRequest/Source/andy_web_request_feature.rb', line 39

def initialize(values= {})
  super(values)

  self.types= [:business_entities] if self.types.blank?

  # Configuro los templates

  set_template("json_web_request", Template.new(:file => 'web_request.erb'))
end

Instance Method Details

#configure_attributesObject

Configura los atributos personalizados de la caracteristica (antes de establecer el generador)



60
61
62
63
# File 'lib/CapicuaGenBalthazar/Web/AndyWebRequest/Source/andy_web_request_feature.rb', line 60

def configure_attributes()
  self.generation_attributes[:package]        = "#{self.generation_attributes[:package]}.tools" unless self.generation_attributes.has_in_self?(:package)
  self.generation_attributes[:package_out_dir]= get_package_out_dir
end

#configure_template_targetsObject

Configura los objetivos de las platillas (despues de establecer el generador)



49
50
51
# File 'lib/CapicuaGenBalthazar/Web/AndyWebRequest/Source/andy_web_request_feature.rb', line 49

def configure_template_targets
  set_template_target("json_web_request", TemplateTarget.new(:out_file => get_package_out_file("WebRequest.java"), :types => :proyect_file))
end

#reset_attributesObject

Resetea los atributos personalizados de la caracteristica (antes de establecer el generador)



54
55
56
57
# File 'lib/CapicuaGenBalthazar/Web/AndyWebRequest/Source/andy_web_request_feature.rb', line 54

def reset_attributes
  self.generation_attributes[:package]        = nil
  self.generation_attributes[:package_out_dir]= nil
end