You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cards and atoms are currently both implemented as modules with #name, #type, and #render defined as module_functions.
This isn't great Ruby style. Here are some alternatives:
using classes instead of modules would require class-level method definitions of #name and #type so that searching and validation work in a reasonable way. this is kind of messy but would be somewhat nicer if card and atom base classes were provided (possibly using something like cattr_accessor for #name...)
using a hash with render being a callable. this seems sloppy.
Also, I'm not in love with the long method signatures for render. Considering switching to
defrender(*args)env=args[:env]value=args[:value]
...
end
The text was updated successfully, but these errors were encountered:
Cards and atoms are currently both implemented as modules with
#name
,#type
, and#render
defined asmodule_functions
.This isn't great Ruby style. Here are some alternatives:
#name
and#type
so that searching and validation work in a reasonable way. this is kind of messy but would be somewhat nicer if card and atom base classes were provided (possibly using something likecattr_accessor
for#name
...)Also, I'm not in love with the long method signatures for render. Considering switching to
The text was updated successfully, but these errors were encountered: