Class: Mutiny::Subjects::Environment::Type
- Inherits:
-
Object
- Object
- Mutiny::Subjects::Environment::Type
- Defined in:
- lib/mutiny/subjects/environment/type.rb
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
-
#mod ⇒ Object
readonly
Returns the value of attribute mod.
Instance Method Summary collapse
-
#initialize(mod, configuration) ⇒ Type
constructor
A new instance of Type.
- #relevant? ⇒ Boolean
- #to_subject ⇒ Object
Constructor Details
#initialize(mod, configuration) ⇒ Type
Returns a new instance of Type.
7 8 9 10 |
# File 'lib/mutiny/subjects/environment/type.rb', line 7 def initialize(mod, configuration) @mod = mod @configuration = configuration end |
Instance Attribute Details
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
5 6 7 |
# File 'lib/mutiny/subjects/environment/type.rb', line 5 def configuration @configuration end |
#mod ⇒ Object (readonly)
Returns the value of attribute mod.
5 6 7 |
# File 'lib/mutiny/subjects/environment/type.rb', line 5 def mod @mod end |
Instance Method Details
#relevant? ⇒ Boolean
12 13 14 |
# File 'lib/mutiny/subjects/environment/type.rb', line 12 def relevant? !name.nil? && in_scope? && loadable? end |
#to_subject ⇒ Object
16 17 18 |
# File 'lib/mutiny/subjects/environment/type.rb', line 16 def to_subject Subject.new(name: name, path: absolute_path, root: load_path) end |