Class: RedmineWithGit::Dump::Base

Inherits:
RedmineWithGit::DumpLoad::Base show all
Includes:
EacRubyUtils::Listable
Defined in:
lib/redmine_with_git/dump/base.rb

Direct Known Subclasses

All, Database, Files, Git

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, options = {}) ⇒ Base

Returns a new instance of Base.



16
17
18
19
20
21
# File 'lib/redmine_with_git/dump/base.rb', line 16

def initialize(path, options = {})
  options.assert_argument ::Hash, 'options'
  @options = options
  validate_overwrite
  super(path)
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



14
15
16
# File 'lib/redmine_with_git/dump/base.rb', line 14

def options
  @options
end

Instance Method Details

#overwriteObject



23
24
25
26
# File 'lib/redmine_with_git/dump/base.rb', line 23

def overwrite
  v = @options[:overwrite]
  v.present? ? v.to_i : OVERWRITE_DENIED
end

#space_limitObject



28
29
30
# File 'lib/redmine_with_git/dump/base.rb', line 28

def space_limit
  @options[:space_limit]
end