Module: Cleon

Defined in:
lib/cleon.rb,
lib/cleon/cli.rb,
lib/cleon/home.rb,
lib/cleon/decor.rb,
lib/cleon/model.rb,
lib/cleon/branded.rb,
lib/cleon/gateway.rb,
lib/cleon/version.rb,
lib/cleon/arguards.rb,
lib/cleon/explorer.rb,
lib/cleon/port_decor.rb,
lib/cleon/basics/entity.rb,
lib/cleon/basics/arguard.rb,
lib/cleon/basics/service.rb,
lib/cleon/services/clone_cleon.rb,
lib/cleon/services/clone_guard.rb,
lib/cleon/services/clone_entity.rb,
lib/cleon/services/clone_concept.rb,
lib/cleon/services/clone_service.rb,
lib/cleon/services/port_services.rb

Defined Under Namespace

Modules: ArGuards, BrandedFile, CLI, Entities, Services Classes: ArGuard, Decor, Error, Explorer, Gateway, Home, MetaService, Model, Param, PortDecor

Constant Summary collapse

GuardGateway =
Cleon::ArGuard.new(
"gateway", "must be Cleon::Gateways::Gateway",
Proc.new {|v| v.is_a? Cleon::Gateway})
GuardStringArray =
Cleon::ArGuard.new('args', 'must be Array<String>',
Proc.new {|v| v.is_a?(Array) && v.all?{|v| v.is_a?(String)}})
VERSION =
"0.5.0"

Class Method Summary collapse

Class Method Details

.error!(message) ⇒ Object

Raises:



25
26
27
# File 'lib/cleon.rb', line 25

def error!(message)
  raise Error.new(message)
end

.gatewayObject



33
34
35
# File 'lib/cleon.rb', line 33

def gateway
  @gateway # ||= Cleon::Gateways::Gateway.new
end

.gateway=(gateway) ⇒ Object



37
38
39
# File 'lib/cleon.rb', line 37

def gateway=(gateway)
  @gateway = GuardGateway.(gateway)
end

.rootObject



21
22
23
# File 'lib/cleon.rb', line 21

def root
  File.dirname __dir__
end