class Pbw::Rules::CommandGenerator

Public Instance Methods

create_process() click to toggle source
# File lib/generators/pbw/rules/command/command_generator.rb, line 9
def create_process
        if options[:create_process]
                generate "pbw:rules:process", "#{class_name} #{attrs.map{|attr| "#{attr.name}:#{attr.type}"}.join(' ')}"
        end
end

Protected Instance Methods

available_views() click to toggle source
# File lib/generators/pbw/rules/command/command_generator.rb, line 16
def available_views
        %w(new)
end
base_model_class() click to toggle source
# File lib/generators/pbw/rules/command/command_generator.rb, line 20
def base_model_class
        "Pbw::Command"
end
default_attributes() click to toggle source
# File lib/generators/pbw/rules/command/command_generator.rb, line 28
def default_attributes
        super
        @default_attributes << {name: 'token', default_value: ''}
        @default_attributes
end
model_namespace() click to toggle source
# File lib/generators/pbw/rules/command/command_generator.rb, line 24
def model_namespace
        "Commands"
end
param_root() click to toggle source
# File lib/generators/pbw/rules/command/command_generator.rb, line 34
def param_root
        'command'
end