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.
10 11 12 13 14 |
# File 'lib/rbs/cli.rb', line 10 def initialize() @libs = [] @dirs = [] @no_stdlib = false end |
Instance Attribute Details
#dirs ⇒ Object (readonly)
Returns the value of attribute dirs.
7 8 9 |
# File 'lib/rbs/cli.rb', line 7 def dirs @dirs end |
#libs ⇒ Object (readonly)
Returns the value of attribute libs.
6 7 8 |
# File 'lib/rbs/cli.rb', line 6 def libs @libs end |
#no_stdlib ⇒ Object
Returns the value of attribute no_stdlib.
8 9 10 |
# File 'lib/rbs/cli.rb', line 8 def no_stdlib @no_stdlib end |
Instance Method Details
#setup(loader) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/rbs/cli.rb', line 16 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 |