CYRToken.m 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //
  2. // CYRTextAttribute.m
  3. //
  4. // Version 0.2.0
  5. //
  6. // Created by Illya Busigin on 01/05/2014.
  7. // Copyright (c) 2014 Cyrillian, Inc.
  8. //
  9. // Distributed under MIT license.
  10. // Get the latest version from here:
  11. //
  12. // https://github.com/illyabusigin/CYRTextView
  13. //
  14. // The MIT License (MIT)
  15. //
  16. // Copyright (c) 2014 Cyrillian, Inc.
  17. //
  18. // Permission is hereby granted, free of charge, to any person obtaining a copy of
  19. // this software and associated documentation files (the "Software"), to deal in
  20. // the Software without restriction, including without limitation the rights to
  21. // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
  22. // the Software, and to permit persons to whom the Software is furnished to do so,
  23. // subject to the following conditions:
  24. //
  25. // The above copyright notice and this permission notice shall be included in all
  26. // copies or substantial portions of the Software.
  27. //
  28. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  29. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
  30. // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
  31. // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
  32. // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  33. // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  34. #import "CYRToken.h"
  35. @implementation CYRToken
  36. + (instancetype)tokenWithName:(NSString *)name expression:(NSString *)expression attributes:(NSDictionary *)attributes
  37. {
  38. CYRToken *textAttribute = [CYRToken new];
  39. textAttribute.name = name;
  40. textAttribute.expression = expression;
  41. textAttribute.attributes = attributes;
  42. return textAttribute;
  43. }
  44. @end