module Disco::Generators::UseDomainOption

Protected Instance Methods

use_domain(file_name) click to toggle source
# File lib/generators/disco/use_domain_option.rb, line 21
def use_domain(file_name)
  if use_domain?
    "domain_#{file_name}"
  else
    file_name
  end
end
use_domain?() click to toggle source
# File lib/generators/disco/use_domain_option.rb, line 17
def use_domain?
  options[:domain]
end
use_domain_base_path() click to toggle source
# File lib/generators/disco/use_domain_option.rb, line 37
def use_domain_base_path
  if use_domain?
    'domain'
  else
    'app'
  end
end
use_domain_class_file_path(type, file_name) click to toggle source
# File lib/generators/disco/use_domain_option.rb, line 45
def use_domain_class_file_path(type, file_name)
  File.join use_domain_base_path, type, use_domain_class_path, file_name
end
use_domain_class_path() click to toggle source
# File lib/generators/disco/use_domain_option.rb, line 29
def use_domain_class_path
  if use_domain?
    domain_class_path
  else
    class_path
  end
end
use_domain_param() click to toggle source
# File lib/generators/disco/use_domain_option.rb, line 49
def use_domain_param
  '--domain' if use_domain?
end