lazyatom (James Adam)
- Login: lazyatom
- Email: james@lazyatom.com
- Registered on: 10/30/2015
- Last sign in: 10/12/2016
Issues
| open | closed | Total | |
|---|---|---|---|
| Assigned issues | 0 | 0 | 0 |
| Reported issues | 0 | 1 | 1 |
Activity
11/12/2015
-
08:15 PM Ruby Misc #11681 (Closed): Refinements documentation is based on older implementation
- It seems that the refinements documentation hasn't been updated to reflect more recent changes to how refinements work. For example, [[https://github.com/ruby/ruby/blob/trunk/doc/syntax/refinements.rdoc#scope]] says "You may only activat...
11/02/2015
-
11:17 PM Ruby Feature #9696: More Flexible Refinement Syntax
- Another alternative is to slightly abuse the fact that refinements are also modules:
~~~
module Refinement
Behaviour = refine Target do
def new_method
'facets-supplied-behaviour'
end
end
end
~~~
To use as ... -
11:13 PM Ruby Feature #9696: More Flexible Refinement Syntax
- It *might* be possible to support both monkey-patching and refinements with a combination of modules, using prepend and refine:
~~~
class Target
end
# actual code
module Behaviour
def new_method
'facets-supplied behaviou...