Class: Yap::Addon::Reference
- Inherits:
-
Object
- Object
- Yap::Addon::Reference
- Defined in:
- lib/yap/addon/reference.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#require_as ⇒ Object
readonly
Returns the value of attribute require_as.
Instance Method Summary collapse
- #disabled? ⇒ Boolean
- #enabled? ⇒ Boolean
-
#initialize(name:, require_as:, path:, enabled: true) ⇒ Reference
constructor
A new instance of Reference.
Constructor Details
#initialize(name:, require_as:, path:, enabled: true) ⇒ Reference
Returns a new instance of Reference.
6 7 8 9 10 11 |
# File 'lib/yap/addon/reference.rb', line 6 def initialize(name:, require_as:, path:, enabled: true) @name = name @require_as = require_as @path = path @enabled = enabled end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/yap/addon/reference.rb', line 4 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
4 5 6 |
# File 'lib/yap/addon/reference.rb', line 4 def path @path end |
#require_as ⇒ Object (readonly)
Returns the value of attribute require_as.
4 5 6 |
# File 'lib/yap/addon/reference.rb', line 4 def require_as @require_as end |
Instance Method Details
#disabled? ⇒ Boolean
13 14 15 |
# File 'lib/yap/addon/reference.rb', line 13 def disabled? !@enabled end |
#enabled? ⇒ Boolean
17 18 19 |
# File 'lib/yap/addon/reference.rb', line 17 def enabled? @enabled end |