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.should_fork = true
end

Yield Parameters:



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

def change
  yield self
end

.copy_repositoryBoolean Also known as: copy_repository?

Returns If true, a copy of a repository is created and stored in repo_dir.

Returns:

  • (Boolean)

    If true, a copy of a repository is created and stored in repo_dir.



51
52
53
# File 'lib/ed/config.rb', line 51

def copy_repository
  @copy_repository
end

.copy_repository=(value) ⇒ Object

Parameters:

  • value (Boolean)

    If true, a copy of a repository is created and stored in repo_dir.



43
44
45
# File 'lib/ed/config.rb', line 43

def copy_repository= value
  @copy_repository = value
end

.repo_dirPathname

Returns The path being used to store copied repositories.

Returns:

  • (Pathname)

    The path being used to store copied 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 for storing copied 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

.should_forkBoolean Also known as: should_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.



74
75
76
# File 'lib/ed/config.rb', line 74

def should_fork
  @should_fork
end

.should_fork=(value) ⇒ Boolean

Parameters:

  • value (Boolean)

    If true, a subprocess is created to check out a commit.

Returns:

  • (Boolean)


62
63
64
65
66
67
68
# File 'lib/ed/config.rb', line 62

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

  @should_fork = value
end