Class: Lucid::Context

Inherits:
Object show all
Defined in:
lib/lucid/context.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user_options = {}) ⇒ Context

Returns a new instance of Context.



12
13
14
# File 'lib/lucid/context.rb', line 12

def initialize(user_options = {})
  @options = default_options.merge(user_options)
end

Class Method Details

.defaultObject



3
4
5
# File 'lib/lucid/context.rb', line 3

def self.default
  new
end

.parse(argument) ⇒ Object



7
8
9
10
# File 'lib/lucid/context.rb', line 7

def self.parse(argument)
  return new(argument) if argument.is_a?(Hash)
  argument
end

Instance Method Details

#autoload_code_pathsObject



36
37
38
# File 'lib/lucid/context.rb', line 36

def autoload_code_paths
  @options[:autoload_code_paths]
end

#dry_run?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/lucid/context.rb', line 16

def dry_run?
  @options[:dry_run]
end

#expand?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/lucid/context.rb', line 28

def expand?
  @options[:expand]
end

#guess?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/lucid/context.rb', line 20

def guess?
  @options[:guess]
end

#matcher_typeObject



40
41
42
# File 'lib/lucid/context.rb', line 40

def matcher_type
  @options[:matcher_type]
end

#spec_sourceObject



32
33
34
# File 'lib/lucid/context.rb', line 32

def spec_source
  @options[:spec_source]
end

#strict?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/lucid/context.rb', line 24

def strict?
  @options[:strict]
end