Class: Yap::Addon::Reference

Inherits:
Object
  • Object
show all
Defined in:
lib/yap/addon/reference.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/yap/addon/reference.rb', line 4

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



4
5
6
# File 'lib/yap/addon/reference.rb', line 4

def path
  @path
end

#require_asObject (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

Returns:

  • (Boolean)


13
14
15
# File 'lib/yap/addon/reference.rb', line 13

def disabled?
  !@enabled
end

#enabled?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/yap/addon/reference.rb', line 17

def enabled?
  @enabled
end