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



228
229
230
# File 'lib/output/writer.rb', line 228

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

#fully_qualified(mod, writer_name) ⇒ Object



222
223
224
225
226
# File 'lib/output/writer.rb', line 222

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