Class: Mddb::Generators::Atom

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/mddb/generators/atom.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



8
9
10
# File 'lib/mddb/generators/atom.rb', line 8

def self.source_root
  File.expand_path('../../templates', __FILE__)
end

Instance Method Details

#atomObject



12
13
14
15
# File 'lib/mddb/generators/atom.rb', line 12

def atom
  template "atom.rb.tt", "models/atoms/#{name}.rb"
  template "spec/atom_spec.rb.tt", "spec/atoms/#{name}_spec.rb"
end