Module: Output::Writer::Naming

Extended by:
Naming
Included in:
Naming
Defined in:
lib/output/writer.rb

Instance Method Summary collapse

Instance Method Details

#camel_case(name) ⇒ Object



230
231
232
# File 'lib/output/writer.rb', line 230

def camel_case(name)
  name.to_s.split('_').collect { |s| s.capitalize }.join
end

#fully_qualified(mod, writer_name) ⇒ Object



224
225
226
227
228
# File 'lib/output/writer.rb', line 224

def fully_qualified(mod, writer_name)
  namespace = mod.name
  writer_name = camel_case(writer_name)
  "#{namespace}::#{writer_name}"
end