Class: TRuby::UnionTypeParser
- Inherits:
-
Object
- Object
- TRuby::UnionTypeParser
- Defined in:
- lib/t_ruby/union_type_parser.rb
Instance Method Summary collapse
-
#initialize(type_string) ⇒ UnionTypeParser
constructor
A new instance of UnionTypeParser.
- #parse ⇒ Object
Constructor Details
#initialize(type_string) ⇒ UnionTypeParser
5 6 7 |
# File 'lib/t_ruby/union_type_parser.rb', line 5 def initialize(type_string) @type_string = type_string.strip end |
Instance Method Details
#parse ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/t_ruby/union_type_parser.rb', line 9 def parse # Check if it contains pipes (union indicator) if @type_string.include?("|") parse_union else parse_simple end end |