Class: Charyf::Generators::NamedBase

Inherits:
Base
  • Object
show all
Defined in:
lib/charyf/utils/generators/named_base.rb

Direct Known Subclasses

IntentsGenerator, SkillGenerator

Instance Method Summary collapse

Methods inherited from Base

class_option, desc, desc_file, hide!, hook_for, inherited, namespace, source_root

Methods included from Actions

#add_source, #after_bundle, #environment, #gem, #gem_group, #git

Constructor Details

#initialize(args, *options) ⇒ NamedBase

:nodoc:



10
11
12
13
14
15
# File 'lib/charyf/utils/generators/named_base.rb', line 10

def initialize(args, *options) #:nodoc:
  # Unfreeze name in case it's given as a frozen string
  args[0] = args[0].dup if args[0].is_a?(String) && args[0].frozen?
  super
  assign_names!(name)
end