Method: Gitgo::Index#create
- Defined in:
- lib/gitgo/index.rb
#create(source) ⇒ Object
171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/gitgo/index.rb', line 171 def create(source) source_idx = idx(source) head_idx = graph_head_idx(source_idx) unless head_idx.nil? || head_idx == source_idx raise "create graph fail: #{source} (already associated with graph #{list[head_idx]})" end map[source_idx] = source_idx self end |