Module: Roda::Project::Helpers::Ids

Included in:
Generator, MainContext
Defined in:
lib/roda/project/helpers/ids.rb

Instance Method Summary collapse

Instance Method Details

#api_idObject



6
# File 'lib/roda/project/helpers/ids.rb', line 6

def api_id = Roda::Project::API

#fullstack_idObject



5
# File 'lib/roda/project/helpers/ids.rb', line 5

def fullstack_id = Roda::Project::FULLSTACK

#id_to_string(id, type) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/roda/project/helpers/ids.rb', line 14

def id_to_string(id, type)
  const =
    case type
    when :base
      case id
      when fullstack_id
        "FULLSTACK"
      when api_id
        "API"
      when minimal_id
        "MINIMAL"
      end
    when :database
      case id
      when mysql_id
        "MYSQL"
      when sqlite_id
        "SQLITE"
      when postgresql_id
        "POSTGRESQL"
      end
    when :tests
      case id
      when rspec_id
        "RSPEC"
      when minitest_id
        "MINITEST"
      end
    end

  "Roda::Project::" << const
end

#minimal_idObject



7
# File 'lib/roda/project/helpers/ids.rb', line 7

def minimal_id = Roda::Project::MINIMAL

#minitest_idObject



12
# File 'lib/roda/project/helpers/ids.rb', line 12

def minitest_id = Roda::Project::MINITEST

#mysql_idObject



8
# File 'lib/roda/project/helpers/ids.rb', line 8

def mysql_id = Roda::Project::MYSQL

#postgresql_idObject



10
# File 'lib/roda/project/helpers/ids.rb', line 10

def postgresql_id = Roda::Project::POSTGRESQL

#rspec_idObject



11
# File 'lib/roda/project/helpers/ids.rb', line 11

def rspec_id = Roda::Project::RSPEC

#sqlite_idObject



9
# File 'lib/roda/project/helpers/ids.rb', line 9

def sqlite_id = Roda::Project::SQLITE