Class: Steep::Project::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/steep/project/options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOptions

Returns a new instance of Options.



12
13
14
15
16
17
18
# File 'lib/steep/project/options.rb', line 12

def initialize
  apply_default_typing_options!
  self.vendored_gems_path = nil
  self.vendored_stdlib_path = nil

  @libraries = []
end

Instance Attribute Details

#allow_fallback_anyObject

Returns the value of attribute allow_fallback_any.



4
5
6
# File 'lib/steep/project/options.rb', line 4

def allow_fallback_any
  @allow_fallback_any
end

#allow_missing_definitionsObject

Returns the value of attribute allow_missing_definitions.



5
6
7
# File 'lib/steep/project/options.rb', line 5

def allow_missing_definitions
  @allow_missing_definitions
end

#allow_unknown_constant_assignmentObject

Returns the value of attribute allow_unknown_constant_assignment.



6
7
8
# File 'lib/steep/project/options.rb', line 6

def allow_unknown_constant_assignment
  @allow_unknown_constant_assignment
end

#allow_unknown_method_callsObject

Returns the value of attribute allow_unknown_method_calls.



7
8
9
# File 'lib/steep/project/options.rb', line 7

def allow_unknown_method_calls
  @allow_unknown_method_calls
end

#librariesObject (readonly)

Returns the value of attribute libraries.



10
11
12
# File 'lib/steep/project/options.rb', line 10

def libraries
  @libraries
end

#vendored_gems_pathObject

Returns the value of attribute vendored_gems_path.



9
10
11
# File 'lib/steep/project/options.rb', line 9

def vendored_gems_path
  @vendored_gems_path
end

#vendored_stdlib_pathObject

Returns the value of attribute vendored_stdlib_path.



8
9
10
# File 'lib/steep/project/options.rb', line 8

def vendored_stdlib_path
  @vendored_stdlib_path
end

Instance Method Details

#apply_default_typing_options!Object



20
21
22
23
24
25
# File 'lib/steep/project/options.rb', line 20

def apply_default_typing_options!
  self.allow_fallback_any = true
  self.allow_missing_definitions = true
  self.allow_unknown_constant_assignment = false
  self.allow_unknown_method_calls = false
end

#apply_lenient_typing_options!Object



34
35
36
37
38
39
# File 'lib/steep/project/options.rb', line 34

def apply_lenient_typing_options!
  self.allow_fallback_any = true
  self.allow_missing_definitions = true
  self.allow_unknown_constant_assignment = true
  self.allow_unknown_method_calls = true
end

#apply_strict_typing_options!Object



27
28
29
30
31
32
# File 'lib/steep/project/options.rb', line 27

def apply_strict_typing_options!
  self.allow_fallback_any = false
  self.allow_missing_definitions = false
  self.allow_unknown_constant_assignment = false
  self.allow_unknown_method_calls = false
end