Class: Nwiki::Core::Entry

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/nwiki/core/git_access.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, blob_object) ⇒ Entry

Returns a new instance of Entry.



11
12
13
14
# File 'lib/nwiki/core/git_access.rb', line 11

def initialize path, blob_object
  @path = path
  @blob_object = blob_object
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



9
10
11
# File 'lib/nwiki/core/git_access.rb', line 9

def path
  @path
end

Instance Method Details

#textObject



16
17
18
# File 'lib/nwiki/core/git_access.rb', line 16

def text
  @blob_object.text.force_encoding('UTF-8')
end