Class: PickyGuard::Generators::PolicyGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/picky_guard/policy_generator.rb

Instance Method Summary collapse

Instance Method Details

#generate_policyObject



10
11
12
13
# File 'lib/generators/picky_guard/policy_generator.rb', line 10

def generate_policy
  return unless validate_name(name)
  create_file dest_path(name), content(name)
end