Class: GitDS::RootItem

Inherits:
Object
  • Object
show all
Defined in:
lib/git-ds/model/root.rb

Overview

A mock ModelItem that acts as the root of the data model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(model) ⇒ RootItem

Returns a new instance of RootItem.



20
21
22
23
# File 'lib/git-ds/model/root.rb', line 20

def initialize(model)
  @path = ''
  @model = model
end

Instance Attribute Details

#modelObject (readonly)

Returns the value of attribute model.



17
18
19
# File 'lib/git-ds/model/root.rb', line 17

def model
  @model
end

#pathObject (readonly)

Returns the value of attribute path.



18
19
20
# File 'lib/git-ds/model/root.rb', line 18

def path
  @path
end

Class Method Details

.create(parent, args) ⇒ Object



37
38
39
# File 'lib/git-ds/model/root.rb', line 37

def self.create(parent, args)
  return @model.root
end

.listObject



41
42
43
# File 'lib/git-ds/model/root.rb', line 41

def self.list
  return []
end

.nameObject



29
30
31
# File 'lib/git-ds/model/root.rb', line 29

def self.name
  ''
end

.pathObject



33
34
35
# File 'lib/git-ds/model/root.rb', line 33

def self.path
  ''
end

Instance Method Details

#deleteObject



25
26
27
# File 'lib/git-ds/model/root.rb', line 25

def delete
  # nop
end