Class: Gitgo::Helper::Doc

Inherits:
Object
  • Object
show all
Defined in:
lib/gitgo/helper/doc.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(controller) ⇒ Doc

Returns a new instance of Doc.



7
8
9
# File 'lib/gitgo/helper/doc.rb', line 7

def initialize(controller)
  @controller = controller
end

Instance Attribute Details

#controllerObject (readonly)

Returns the value of attribute controller.



5
6
7
# File 'lib/gitgo/helper/doc.rb', line 5

def controller
  @controller
end

Instance Method Details

#active?(sha) ⇒ Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/gitgo/helper/doc.rb', line 23

def active?(sha)
  at && active_shas.include?(sha)
end

#active_shasObject



19
20
21
# File 'lib/gitgo/helper/doc.rb', line 19

def active_shas
  @active_shas ||= repo.rev_list(at)
end

#atObject



15
16
17
# File 'lib/gitgo/helper/doc.rb', line 15

def at
  controller.user_ref
end

#url(*paths) ⇒ Object



11
12
13
# File 'lib/gitgo/helper/doc.rb', line 11

def url(*paths)
  controller.url(*paths)
end