Module: Talkable::SharedGeneratorMethods

Included in:
ExampleNewsletterSignupGenerator, InstallGenerator, InviteStandaloneGenerator
Defined in:
lib/talkable/generators/shared_generator_methods.rb

Instance Method Summary collapse

Instance Method Details

#erb?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/talkable/generators/shared_generator_methods.rb', line 12

def erb?
  template_lang == 'erb'
end

#template_langObject



2
3
4
5
6
7
8
9
10
# File 'lib/talkable/generators/shared_generator_methods.rb', line 2

def template_lang
  @template_lang ||= if options[:haml]
   'haml'
  elsif options[:slim]
   'slim'
  else
   Rails::Generators.options[:rails][:template_engine].to_s.downcase
  end
end