//
//  WMFetchDataViewModel+GMRequest.m
//  Gengmei
//
//  Created by 汪俊 on 2017/7/13.
//  Copyright © 2017年 更美互动信息科技有限公司. All rights reserved.
//

#import "WMFetchDataViewModel+GMRequest.h"
#import <objc/runtime.h>

@implementation WMFetchDataViewModel (GMRequest)

- (void)setOffset:(id)offset {
    objc_setAssociatedObject(self, @selector(offset), offset, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
- (id)offset {
    id _offset = objc_getAssociatedObject(self, @selector(offset));
    if (_offset == nil) {
        return @"";
    }

    if ([_offset isKindOfClass:[NSNumber class]]) {
        return [_offset stringValue];
    }

    return _offset;
}

@end
