Module: Serializer::RSON::Instance
- Included in:
- Serializer::RSON
- Defined in:
- lib/serializer/rson/instance/public.rb,
lib/serializer/rson/instance/private.rb
Instance Method Summary collapse
Instance Method Details
#hydrate ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'lib/serializer/rson/instance/public.rb', line 36 def hydrate raise ArgumentError, { ast_class:@abstract_syntax_tree.class, ast:@abstract_syntax_tree } unless @abstract_syntax_tree.kind_of? Parser::AST::Node hydrate_abstract_syntax_tree(@abstract_syntax_tree) rescue Exception => e raise e end |
#initialize(buffer) ⇒ Object
26 27 28 29 |
# File 'lib/serializer/rson/instance/public.rb', line 26 def initialize(buffer) @buffer = buffer @abstract_syntax_tree = Parser::Ruby23.parse(@buffer) end |