class Scaffolding::ClassNamesTransformer

def all_parts_in_context

def all_parts_in_context
  working_parts = parts
  working_parent_parts = parent_parts
  # e.g. Webhooks::Incoming::Event vs. Webhooks::Incoming::Delivery
  while working_parts.first == working_parent_parts.first
    # get rid of 'Webhooks::' and 'Incoming::'
    working_parts.shift
    working_parent_parts.shift
  end
  # e.g. Conversation vs. Conversations::Subscription
  while working_parts.first == working_parent_parts.first.pluralize
    # get rid of 'Conversations::'
    working_parts.shift
  end
  [working_parts, working_parent_parts]
end