Class: Shomen::Model::Document

Inherits:
Abstract show all
Defined in:
lib/shomen/model/document.rb

Direct Known Subclasses

Script

Instance Attribute Summary collapse

Attributes inherited from Abstract

#tags

Class Method Summary collapse

Methods inherited from Abstract

#initialize, #type

Methods inherited from AbstractPrime

#[], #[]=, attr_accessor, #initialize, #to_h

Constructor Details

This class inherits a constructor from Shomen::Model::Abstract

Instance Attribute Details

#formatObject

Format of comment (rdoc, markdown or plain).



30
31
32
# File 'lib/shomen/model/document.rb', line 30

def format
  @format
end

#mtimeObject

Returns the value of attribute mtime.



25
26
27
# File 'lib/shomen/model/document.rb', line 25

def mtime
  @mtime
end

#nameObject

def key=(path)

path = '/' + path unless path[0,1] == '/'
super(path)

end



19
20
21
# File 'lib/shomen/model/document.rb', line 19

def name
  @name
end

#pathObject

attr_accessor :parent



23
24
25
# File 'lib/shomen/model/document.rb', line 23

def path
  @path
end

#textObject

Returns the value of attribute text.



27
28
29
# File 'lib/shomen/model/document.rb', line 27

def text
  @text
end

Class Method Details

.typeObject



10
11
12
# File 'lib/shomen/model/document.rb', line 10

def self.type
  'document'
end