Class: RBS::CLI::LibraryOptions
- Inherits:
-
Object
- Object
- RBS::CLI::LibraryOptions
- Defined in:
- lib/rbs/cli.rb
Instance Attribute Summary collapse
-
#dirs ⇒ Object
readonly
Returns the value of attribute dirs.
-
#libs ⇒ Object
readonly
Returns the value of attribute libs.
-
#no_stdlib ⇒ Object
Returns the value of attribute no_stdlib.
Instance Method Summary collapse
-
#initialize ⇒ LibraryOptions
constructor
A new instance of LibraryOptions.
- #setup(loader) ⇒ Object
Constructor Details
#initialize ⇒ LibraryOptions
Returns a new instance of LibraryOptions.
12 13 14 15 16 |
# File 'lib/rbs/cli.rb', line 12 def initialize() @libs = [] @dirs = [] @no_stdlib = false end |
Instance Attribute Details
#dirs ⇒ Object (readonly)
Returns the value of attribute dirs.
9 10 11 |
# File 'lib/rbs/cli.rb', line 9 def dirs @dirs end |
#libs ⇒ Object (readonly)
Returns the value of attribute libs.
8 9 10 |
# File 'lib/rbs/cli.rb', line 8 def libs @libs end |
#no_stdlib ⇒ Object
Returns the value of attribute no_stdlib.
10 11 12 |
# File 'lib/rbs/cli.rb', line 10 def no_stdlib @no_stdlib end |
Instance Method Details
#setup(loader) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/rbs/cli.rb', line 18 def setup(loader) libs.each do |lib| loader.add(library: lib) end dirs.each do |dir| loader.add(path: Pathname(dir)) end loader.no_builtin! if no_stdlib loader end |