Class: Ixtlan::Generators::AuditBase
- Defined in:
- lib/generators/ixtlan/audit_base.rb
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#add_gem ⇒ Object
22 23 24 |
# File 'lib/generators/ixtlan/audit_base.rb', line 22 def add_gem gem 'ixtlan-audit' unless File.read('Gemfile') =~ /gem\s['"]ixtlan-audit['"]/ end |
#create ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/generators/ixtlan/audit_base.rb', line 6 def create args = [] if name args << ARGV.shift else args << "audit" end args += ['login:string', 'message:string'] args += ARGV args += ["--read-only", "--timestamps"] generate generator_name, *args end |