require 'rid/generators/named_base' module Rid::Generators class ScaffoldGenerator < NamedBase def create_view_function Rid::Generators.invoke :view, *invokation_options end def inject_validations Rid::Generators.invoke :validation, *invokation_options end def create_list_function Rid::Generators.invoke :list, *invokation_options end def create_show_function Rid::Generators.invoke :show, *invokation_options end def create_update_function Rid::Generators.invoke :update, *invokation_options end protected # TODO: add default options, like --help, --force etc def invokation_options [[name] + attributes, { :behavior => behavior }] end end end