Class: ROM::Generators::Base
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- ROM::Generators::Base
show all
- Defined in:
- lib/generators/rom.rb
Class Method Summary
collapse
Class Method Details
.base_name ⇒ Object
7
8
9
|
# File 'lib/generators/rom.rb', line 7
def self.base_name
'rom'
end
|
.default_adapter ⇒ Object
26
27
28
|
# File 'lib/generators/rom.rb', line 26
def self.default_adapter
(default_gateway && default_gateway.adapter)
end
|
.default_gateway ⇒ Object
22
23
24
|
# File 'lib/generators/rom.rb', line 22
def self.default_gateway
ROM.env.gateways[:default]
end
|
.namespace ⇒ Object
11
12
13
|
# File 'lib/generators/rom.rb', line 11
def self.namespace
"rom:#{generator_name}"
end
|
.source_root ⇒ Object
15
16
17
18
19
20
|
# File 'lib/generators/rom.rb', line 15
def self.source_root
File.expand_path(
"../#{base_name}/#{generator_name}/templates",
__FILE__
)
end
|