Method: Eternity::Repository#initialize
- Defined in:
- lib/eternity/repository.rb
#initialize(name, options = {}) ⇒ Repository
Returns a new instance of Repository.
6 7 8 9 10 11 12 13 14 |
# File 'lib/eternity/repository.rb', line 6 def initialize(name, ={}) @name = name.to_s @id = Eternity.keyspace[:repository][@name] @tracker = Tracker.new self @current = Restruct::Hash.new connection: Eternity.connection, id: id[:current] @branches = Restruct::Hash.new connection: Eternity.connection, id: id[:branches] @locker = Eternity.locker_for @name @default_branch = .fetch(:default_branch, 'master').to_s end |