Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ea944f06
Commit
ea944f06
authored
Sep 06, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Our markdown renderer doesn't like those newlines
parent
92a4c59b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
doc/development/ee_features.md
doc/development/ee_features.md
+3
-8
No files found.
doc/development/ee_features.md
View file @
ea944f06
...
...
@@ -75,12 +75,11 @@ There are a few gotchas with it:
-
when the original implementation contains a guard clause (e.g.
`return unless condition`
), we cannot easily extend the behaviour by
overriding the method, because we can't know when the overridden method
(i.e. calling
super
in the overriding method) would want to stop early.
(i.e. calling
`super`
in the overriding method) would want to stop early.
In this case, we shouldn't just override it, but update the original method
to make it call the other method we want to extend, like a
[
template method
pattern
](
https://en.wikipedia.org/wiki/Template_method_pattern
)
.
For example, given this base:
```
ruby
class
Base
def
execute
...
...
@@ -91,10 +90,8 @@ There are a few gotchas with it:
end
end
```
Instead of just overriding
`Base#execute`
, we should update it and extract
the behaviour into another method:
```
ruby
class
Base
def
execute
...
...
@@ -111,9 +108,8 @@ There are a few gotchas with it:
end
end
```
Then we're free to override that
`do_something`
without worrying the guards:
Then we're free to override that
`do_something`
without worrying about the
guards:
```
ruby
module
EE::Base
def
do_something
...
...
@@ -121,7 +117,6 @@ There are a few gotchas with it:
end
end
```
This would require updating CE first, or make sure this is back ported to CE.
When prepending, place them in the
`ee/`
specific sub-directory, and
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment