Module: Loudmouth::Generators::OrmHelpers

Defined in:
lib/generators/loudmouth/orm_helpers.rb

Instance Method Summary collapse

Instance Method Details

#model_contentsObject



4
5
6
7
# File 'lib/generators/loudmouth/orm_helpers.rb', line 4

def model_contents
<<-CONTENT
CONTENT
end

#model_exists?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/generators/loudmouth/orm_helpers.rb', line 9

def model_exists?
  File.exists?(File.join(destination_root, model_path))
end

#model_pathObject



13
14
15
# File 'lib/generators/loudmouth/orm_helpers.rb', line 13

def model_path
  @model_path ||= File.join("app", "models", "#{file_path}.rb")
end