Module: Ed::Config

Defined in:
lib/ed/config.rb

Class Method Summary collapse

Class Method Details

.change {|config| ... } ⇒ Object

Examples:


Ed::Config.change do |config|
  config.fork = false
end

Yield Parameters:



17
18
19
# File 'lib/ed/config.rb', line 17

def change
  yield self
end

.forkBoolean Also known as: fork?

Returns true if a subprocess is created to check out a commit.

Returns:

  • (Boolean)

    Returns true if a subprocess is created to check out a commit.



57
58
59
# File 'lib/ed/config.rb', line 57

def fork
  @fork
end

.fork=(value) ⇒ Boolean

Parameters:

  • value (Boolean)

    Enable or disable the creation of a subprocess to check out a commit.

Returns:

  • (Boolean)


45
46
47
48
49
50
51
# File 'lib/ed/config.rb', line 45

def fork= value
  if value && Ed::Env.fork_unavailable?
    raise ArgumentError, 'Kernel#fork is not available on your platform.'
  end

  @fork = value
end

.repo_dirPathname

Returns The path being used to store cloned repositories.

Returns:

  • (Pathname)

    The path being used to store cloned repositories.



35
36
37
# File 'lib/ed/config.rb', line 35

def repo_dir
  @repo_dir
end

.repo_dir=(path) ⇒ Pathname

Parameters:

  • path (String, #to_s)

    The path to use when storing cloned repositories.

Returns:

  • (Pathname)


27
28
29
# File 'lib/ed/config.rb', line 27

def repo_dir= path
  @repo_dir = Pathname.new path.to_s
end