Hiccdown Development Notes

Showing only ideas leading to #315 and its comments.

See full discussion·​See most recent related ideas
  Log in or sign up to participate in this discussion.
With an account, you can revise, criticize, and comment on ideas.

Discussions can branch out indefinitely. You may need to scroll sideways.
Dennis Hackethal’s avatar
Dennis HackethalOP·​#1982·​·​Criticism
5th of 5 versions leading to #315 (5 total)

Hiccdown methods should live in their own, separate classes. How about they are called ‘displays’?

ruby
class ProductsDisplay
def index vc, # …
vc.some_helper_method
end
end

Behind the scenes, the Hiccdown gem would need to make the instance variables available to the display class:

ruby
display = @display_module.new
view_context.instance_variables.each do |iv|
display.instance_variable_set(
iv,
view_context.instance_variable_get(iv)
)
end

Then:

ruby
class ProductsDisplay
def index vc, # …
vc.some_helper_method(@products)
end
end
Criticized1*ArchivedLinked to by #331 and #5851
Dennis Hackethal’s avatar
Dennis HackethalOP·​#317·​·​Criticism
2nd of 2 versions leading to #315 (2 total)

Then how would you call index from a helper method?

Criticized1*Archived
Dennis Hackethal’s avatar
Dennis HackethalOP·​#315·​·​Criticism

I don’t think that’s something people would do a lot, but they still easily could: ProductsRenderer.index(self)

Archived
Dennis Hackethal’s avatar
Dennis HackethalOP·​#321·​·​Criticism

Test this!

Criticized1Archived
Dennis Hackethal’s avatar
Dennis HackethalOP·​#331·​·​Criticism

Not as of #330, they couldn’t.

Criticized1Archived
  • Rationally adoptable.
  • Not rationally adoptable.
  • Older versions with pending criticisms.
  • Ideas are blue, criticisms red, comments small and gray.
  • Hover over ideas to expand them.
  • Click on ideas to jump to their place in the discussion.