Class: Gitgo::Helper::Doc
- Inherits:
-
Object
- Object
- Gitgo::Helper::Doc
- Defined in:
- lib/gitgo/helper/doc.rb
Instance Attribute Summary collapse
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
Instance Method Summary collapse
- #active?(sha) ⇒ Boolean
- #active_shas ⇒ Object
- #at ⇒ Object
-
#initialize(controller) ⇒ Doc
constructor
A new instance of Doc.
- #url(*paths) ⇒ Object
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
#controller ⇒ Object (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
23 24 25 |
# File 'lib/gitgo/helper/doc.rb', line 23 def active?(sha) at && active_shas.include?(sha) end |
#active_shas ⇒ Object
19 20 21 |
# File 'lib/gitgo/helper/doc.rb', line 19 def active_shas @active_shas ||= repo.rev_list(at) end |
#at ⇒ Object
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 |