Class: Repomen::Config
- Inherits:
-
Object
- Object
- Repomen::Config
- Includes:
- WithDefaultConfig
- Defined in:
- lib/repomen/config.rb
Instance Attribute Summary collapse
-
#only_last_revision ⇒ Object
Returns the value of attribute only_last_revision.
- #work_dir ⇒ Object
Instance Method Summary collapse
-
#initialize(options = {}, merge_options = true) ⇒ Config
constructor
A new instance of Config.
- #to_h ⇒ Object
Methods included from WithDefaultConfig
Constructor Details
#initialize(options = {}, merge_options = true) ⇒ Config
Returns a new instance of Config.
36 37 38 39 40 41 |
# File 'lib/repomen/config.rb', line 36 def initialize( = {}, = true) = default_config.to_h.merge() if .each do |name, value| send("#{name}=", value) end end |
Instance Attribute Details
#only_last_revision ⇒ Object
Returns the value of attribute only_last_revision.
31 32 33 |
# File 'lib/repomen/config.rb', line 31 def only_last_revision @only_last_revision end |
#work_dir ⇒ Object
43 44 45 |
# File 'lib/repomen/config.rb', line 43 def work_dir @work_dir || Dir.pwd end |
Instance Method Details
#to_h ⇒ Object
47 48 49 50 51 52 |
# File 'lib/repomen/config.rb', line 47 def to_h { :work_dir => work_dir, :only_last_revision => only_last_revision } end |