Class: Mnemosyne::Registry::Registration
- Inherits:
-
Object
- Object
- Mnemosyne::Registry::Registration
- Extended by:
- Forwardable
- Defined in:
- lib/mnemosyne/registry.rb
Instance Attribute Summary collapse
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#require_paths ⇒ Object
readonly
Returns the value of attribute require_paths.
Instance Method Summary collapse
-
#initialize(class_name, require_paths, probe) ⇒ Registration
constructor
A new instance of Registration.
- #installable? ⇒ Boolean
Constructor Details
#initialize(class_name, require_paths, probe) ⇒ Registration
Returns a new instance of Registration.
12 13 14 15 16 |
# File 'lib/mnemosyne/registry.rb', line 12 def initialize(class_name, require_paths, probe) @class_name = class_name @require_paths = Array(require_paths) @probe = probe end |
Instance Attribute Details
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
10 11 12 |
# File 'lib/mnemosyne/registry.rb', line 10 def class_name @class_name end |
#require_paths ⇒ Object (readonly)
Returns the value of attribute require_paths.
10 11 12 |
# File 'lib/mnemosyne/registry.rb', line 10 def require_paths @require_paths end |
Instance Method Details
#installable? ⇒ Boolean
18 19 20 21 22 |
# File 'lib/mnemosyne/registry.rb', line 18 def installable? return true unless class_name Module.const_defined?(class_name) end |