arkaan 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: '057528c0fc0b7cf0a8fe4277d95ec306335275be'
4
- data.tar.gz: 6dbb9551a932b8cbab69fc8247fb25c03c54c6a4
3
+ metadata.gz: 1f30e89d73e43459af413a4d09135f515d59f5e4
4
+ data.tar.gz: 5bef14473522ac997a9bf49d0a624718b2942cfe
5
5
  SHA512:
6
- metadata.gz: 2a5d9b711367175109942b3dca458a1acfedf443caa04d7672363c66f32fbf1528381dff35fdedd048e04667844137a2ed668eccb39504944f5b16d886ac6f0e
7
- data.tar.gz: 8088aa88b8c56adba51d9f849cad10ab614afd6749e3436e878a83890613ec1c5df963b470e58d5b09d9799882ba0eb7af080e9133fae19c299f6465416e58ae
6
+ metadata.gz: 8207dab2feb2e28b8297627e2fd00922afa3337fd1e49943cc9832a635c67ae6222b720747ed916acb7b75e150c025719ebf3d154de32c5f2238391e939aa310
7
+ data.tar.gz: a553a6ad51f691d16c28019977ecaf290538fff6dfab405372df6a46d8bc424ad16a7daeba10f70cb4b1409574243b8297ed1c7ee3571249145a282b05e17d27
@@ -20,9 +20,6 @@ module Arkaan
20
20
  # @!attribute [r] type
21
21
  # @return [Symbol] the type of instance the application is declaring
22
22
  attr_reader :type
23
- # @!attribute [rw] controller_classes
24
- # @return [Array<Class>] an array of controller classes to run
25
- attr_accessor :controller_classes
26
23
 
27
24
  def initialize
28
25
  @location = false
@@ -33,10 +30,14 @@ module Arkaan
33
30
  @controller_classes = []
34
31
  end
35
32
 
36
- # Add a controller class to the controllers to use.
37
- # @param classname [Class] the class to add to the controller to load at startup.
38
- def add_controller_class(classname)
39
- @controller_classes << classname
33
+ def get_controllers
34
+ return [] if defined?(Controllers).nil?
35
+ classes = Controllers.constants.map { |symbol| get_const(symbol) }
36
+ return classes.select { |symbol| symbol.is_a? Class }
37
+ end
38
+
39
+ def get_const(symbol)
40
+ return Object.const_get("Controllers::#{symbol.to_s}")
40
41
  end
41
42
 
42
43
  # Determines if the application can be loaded (all the parameters have been correctly set)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arkaan
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Courtois