Class: Cleon::Services::PortServices
- Defined in:
- lib/cleon/services/port_services.rb
Overview
Clone services from Cleon's gem into home gem
Constant Summary
Constants included from ArGuards
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(get_from, place_to) ⇒ PortServices
constructor
A new instance of PortServices.
Methods inherited from Service
Constructor Details
#initialize(get_from, place_to) ⇒ PortServices
Returns a new instance of PortServices.
19 20 21 22 23 |
# File 'lib/cleon/services/port_services.rb', line 19 def initialize(get_from, place_to) # TODO: inside a gem or just everywhere ? @get_from = get_from @place_to = place_to end |
Instance Method Details
#call ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/cleon/services/port_services.rb', line 25 def call # TODO: create service_port template # TODO: check ports folder # - create when not exist # - fail when exist # TODO: clone service_port, in basics or @place_to? # TODO: create service_port descendant for each service in @get_from # TODO: create require_relative '@place_to/port_descendant' # TODO: create demo library class # that accepts the same parameters as target service # that just call appropriate port_descendant bundle = Cleon::Explorer.(@get_from) bundle.each do |bu| bu[:service] bu[:params] bu[:args] bu[:helper] end end |