Sha256: 60c17c8f6103e0d6786ddc29eb74d8fdab474e4c940c5435d315031c93e776a7

Contents?: true

Size: 979 Bytes

Versions: 2

Compression:

Stored size: 979 Bytes

Contents

//
//  Section.cc
//  snowcrash
//
//  Created by Zdenek Nemec on 5/14/14.
//  Copyright (c) 2014 Apiary Inc. All rights reserved.
//

#include "Section.h"

using namespace snowcrash;

std::string snowcrash::SectionName(const SectionType& section) {

    switch (section) {
        case ModelSectionType:
        case ModelBodySectionType:
            return "model";
            
        case RequestSectionType:
        case RequestBodySectionType:
            return "request";
            
        case ResponseSectionType:
        case ResponseBodySectionType:
            return "response";
            
        case BodySectionType:
        case DanglingBodySectionType:
            return "message-body";
            
        case SchemaSectionType:
        case DanglingSchemaSectionType:
            return "message-schema";
            
        case HeadersSectionType:
            return "headers";
            
        default:
            return "section";
    }
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
redsnow-0.2.1 ext/snowcrash/src/Section.cc
redsnow-0.2.0 ext/snowcrash/src/Section.cc