Class: GitDS::RootItem
- Inherits:
-
Object
- Object
- GitDS::RootItem
- 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
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
- #delete ⇒ Object
-
#initialize(model) ⇒ RootItem
constructor
A new instance of RootItem.
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
#model ⇒ Object (readonly)
Returns the value of attribute model.
17 18 19 |
# File 'lib/git-ds/model/root.rb', line 17 def model @model end |
#path ⇒ Object (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 |
.list ⇒ Object
41 42 43 |
# File 'lib/git-ds/model/root.rb', line 41 def self.list return [] end |
.name ⇒ Object
29 30 31 |
# File 'lib/git-ds/model/root.rb', line 29 def self.name '' end |
.path ⇒ Object
33 34 35 |
# File 'lib/git-ds/model/root.rb', line 33 def self.path '' end |
Instance Method Details
#delete ⇒ Object
25 26 27 |
# File 'lib/git-ds/model/root.rb', line 25 def delete # nop end |