Closed kuraga closed 11 years ago
Can you explain the reason behind this choice?
@weppos in description now.
Actually, there are two builders: Builder (the abstract class) and SimpleBuilder. There are a couple of reasons that retain me to merge this patch.
First, if we extract this file into simple_builder.rb
, the original file will be called Breadcrumbs and will contain a Builder
definition.
Second, this file breaks the convention Namespace::ClassName
=> namespace/class_name.rb
. To make things right, we should create lib/breadcrumbs_on_rails/breadcrumbs/simple_builder.rb
, not lib/breadcrumbs_on_rails/simple_builder.rb
.
I'm not sure this simple class deserves all this complexity.
@weppos yes, it's my error about path. Fixed.
I think that abstract class may be not in separate file. But class that is just an example (yeah, but standard way) should.
I have wrote the reason. Thanks :-)
I appreciate your time and your contribution, however I believe I will keep all into this file until the need arises to extract it. For example, I will probably agree to extract it if I'll include and additional builder.
:) compromise :-) :+1:
23 was closed but I think it's right that builders (there is one now -
SimpleBuilder
)should be in separate files.
SimpleBuilder
is just an instance (an example) of a builder. It's a standard way but it's not a class to inherit. It's just a one of the ways.SimpleBuilder
has own test file but doesn't have own code file.