Class: MetaProject::ScmWeb
- Inherits:
-
Object
- Object
- MetaProject::ScmWeb
- Defined in:
- lib/meta_project/scm_web.rb
Overview
An ScmWeb instance is capable of generating URLs to various files and diffs in an online scm web interface.
Instance Method Summary collapse
- #diff(path, revision, previous_revision) ⇒ Object
- #history(path) ⇒ Object
- #html(path, revision) ⇒ Object
-
#initialize(overview_spec, history_spec, raw_spec, html_spec, diff_spec) ⇒ ScmWeb
constructor
The variables to use in
uri_specsare:. - #overview ⇒ Object
- #raw(path, revision) ⇒ Object
Constructor Details
#initialize(overview_spec, history_spec, raw_spec, html_spec, diff_spec) ⇒ ScmWeb
The variables to use in uri_specs are:
-
path
-
revision
-
previous_revision
13 14 15 |
# File 'lib/meta_project/scm_web.rb', line 13 def initialize(overview_spec, history_spec, raw_spec, html_spec, diff_spec) @overview_spec, @history_spec, @raw_spec, @html_spec, @diff_spec = overview_spec, history_spec, raw_spec, html_spec, diff_spec end |
Instance Method Details
#diff(path, revision, previous_revision) ⇒ Object
33 34 35 |
# File 'lib/meta_project/scm_web.rb', line 33 def diff(path, revision, previous_revision) file_uri(path, revision, @diff_spec, previous_revision) end |
#history(path) ⇒ Object
21 22 23 |
# File 'lib/meta_project/scm_web.rb', line 21 def history(path) file_uri(path, nil, @history_spec) end |
#html(path, revision) ⇒ Object
29 30 31 |
# File 'lib/meta_project/scm_web.rb', line 29 def html(path, revision) file_uri(path, revision, @html_spec) end |
#overview ⇒ Object
17 18 19 |
# File 'lib/meta_project/scm_web.rb', line 17 def overview file_uri(nil, nil, @overview_spec) end |
#raw(path, revision) ⇒ Object
25 26 27 |
# File 'lib/meta_project/scm_web.rb', line 25 def raw(path, revision) file_uri(path, revision, @raw_spec) end |