{: rooto:"YARD::CodeObjects::RootObject:@childrenIC:&YARD::CodeObjects::CodeObjectList[o:#YARD::CodeObjects::ClassObject;IC;[o; ;IC;[: @owner@ :@class_mixinsIC;[; @ :@instance_mixinsIC;[; @ :@attributesIC:SymbolHash{: classIC;{:@symbolize_valueT: instanceIC;{;T;T: @aliases{: @groups[: @files[[I"lib/jini.rb:ETi(:@current_file_has_commentsT: @name:InvalidPath:@source_type: ruby:@visibility: public: @tags[:@docstrings{:@docstringIC:YARD::Docstring"When path not valid;T;[:@ref_tags[: @allI"When path not valid;T:@unresolved_reference0: @object@ :@hash_flagF:@line_rangeo: Range: exclF: begini':endi':@ref_tag_recurse_counti:@namespace@: @pathI"Jini::InvalidPath;F:@superclasso:YARD::CodeObjects::Proxy :@orignamespace0:@origname0: @imethod0;:StandardError;,@: @obj0: @type;: @dynamicTo:$YARD::CodeObjects::MethodObject:@module_functionF: @scope;;;;-I"Jini#initialize;F:@parameters[[I" head;TI"'';T;[[@i+;T;:initialize;;;[;{;IC; ";T;[o:YARD::Tags::Tag :@tag_nameI" param;F: @textI";T;I" head;T: @types[I" String;T;$@o;< ;=I" return;F;>I"a new instance of Jini;T;0;?[I" Jini;F;$@;![;"I"@param head [String];T;#0;$@;%F;&o;';(F;)i*;*i*;+i;,@:@explicitT: @sourceI"1def initialize(head = '') @head = head end;T:@signatureI"def initialize(head = '');T;6To;7;8F;9;;;;-I"Jini#to_s;F;:[;[[@i1;T;: to_s;;;[;{;IC; "Convert it to a string.;T;[o;< ;=I" return;F;>I"xpath as string;T;0;?[I" String;T;$@;;![;"I"=Convert it to a string. @return [String] xpath as string;T;#0;$@;;%F;&o;';(F;)i/;*i0;+i;,@;@T;AI"def to_s @head.to_s end;T;BI" def to_s;T;6To;7;8F;9;;;;-I"Jini#add_path;F;:[[I" node;T0;[[@i8;T;: add_path;;;[;{;IC; "Additional node for xpath.;T;[o;< ;=I" param;F;>I" node;T;I" node;T;?[I" String;T;$@No;< ;=I" return;F;>I" object;T;0;?[I" Jini;T;$@N;![;"I"OAdditional node for xpath. @param node [String] node @return [Jini] object;T;#0;$@N;%F;&o;';(F;)i5;*i7;+i;,@;@T;AI":def add_path(node) Jini.new("#{@head}/#{node}") end;T;BI"def add_path(node);T;6To;7;8F;9;;;;-I"Jini#add_attr;F;:[[I"key;T0[I" value;T0;[[@iA;T;: add_attr;;;[;{;IC; "5Additional attribute for xpath. '[@key="value"]';T;[o;< ;=I" param;F;>I"name of attr;T;I"key;T;?[I" String;T;$@io;< ;=I" param;F;>I"value of attr;T;I" value;T;?[I" String;T;$@io;< ;=I" return;F;>I" object;T;0;?[I" Jini;T;$@i;![;"I"Additional attribute for xpath. '[@key="value"]' @param key [String] name of attr @param value [String] value of attr @return [Jini] object;T;#0;$@i;%F;&o;';(F;)i<;*i@;+i;,@;@T;AI"Ndef add_attr(key, value) Jini.new("#{@head}[@#{key}=\"#{value}\"]") end;T;BI"def add_attr(key, value);T;6To;7;8F;9;;;;-I"Jini#all_attr;F;:[[I" value;T0;[[@iH;T;: all_attr;;;[;{;IC; "Adds an @value to xpath;T;[o;< ;=I" param;F;>I"with value attr;T;I" value;T;?[I" String;T;$@o;< ;=I" return;F;>I" object;T;0;?[I" Jini;T;$@;![;"I"XAdds an @value to xpath @param value [String] with value attr @return [Jini] object;T;#0;$@;%F;&o;';(F;)iE;*iG;+i;,@;@T;AI"Xpath with all elements. Addition an '*' to tail of xpath;T;[o;< ;=I" return;F;>I" object;T;0;?[I" Jini;T;$@o;< ;=I" raise;F;>I";T;0;?[I"InvalidPath;T;$@;![;"I"TXpath with all elements. Addition an '*' to tail of xpath @return [Jini] object;T;#0;$@;%F;&o;';(F;)iL;*iN;+i;,@;@T;AI"{def all raise InvalidPath, 'You cannot add all tag after attr!' if @head[-1].eql?(']') Jini.new(add_path('*').to_s) end;T;BI" def all;T;6To;7;8F;9;;;;-I"Jini#add_all;F;:[[I" node;T0;[[@iX;T;: add_all;;;[;{;IC; ">Xpath with all named elements. Addition '//node' to xpath;T;[o;< ;=I" param;F;>I"name of node;T;I" node;T;?[I" String;T;$@o;< ;=I" return;F;>I" object;T;0;?[I" Jini;T;$@;![;"I"vXpath with all named elements. Addition '//node' to xpath @param node [String] name of node @return [Jini] object;T;#0;$@;%F;&o;';(F;)iT;*iW;+i;,@;@T;AI":def add_all(node) Jini.new("#{@head}//#{node}") end;T;BI"def add_all(node);T;6To;7;8F;9;;;;-I" Jini#at;F;:[[I" position;T0;[[@i`;T;:at;;;[;{;IC; "1Access by index. Addition '[index]' to xpath;T;[o;< ;=I" param;F;>I" number;T;I" position;T;?[I" Integer;T;$@o;< ;=I" return;F;>I" object;T;0;?[I" Jini;T;$@o;< ;=I" raise;F;>@;0;?[I"InvalidPath;T;$@;![;"I"hAccess by index. Addition '[index]' to xpath @param position [Integer] number @return [Jini] object;T;#0;$@;%F;&o;';(F;)i\;*i_;+i;,@;@T;AI"def at(position) raise InvalidPath, 'Cant use at after selection' if @head.include? '::' Jini.new("#{@head}[#{position}]") end;T;BI"def at(position);T;6To;7;8F;9;;;;-I"Jini#selection;F;:[;[[@ii;T;:selection;;;[;{;IC; "ZReplace all '/' to '::' symbols if path doesn't contain invalid symbols for selection;T;[o;< ;=I" return;F;>I"selection;T;0;?[I" Jini;T;$@o;< ;=I" raise;F;>I"(when path can't present with select;T;0;?[I"InvalidPath;T;$@;![;"I"Replace all '/' to '::' symbols if path doesn't contain invalid symbols for selection @return [Jini] selection @raise [InvalidPath] when path can't present with select;T;#0;$@;%F;&o;';(F;)ie;*ih;+i;,@;@T;AI"def selection if @head.include?('[') || @head.include?(']') || @head.include?('@') || @head.include?('//') raise InvalidPath, 'Cannot select, path contains bad symbols' end Jini.new(@head.gsub('/', '::').to_s) end;T;BI"def selection;T;6To;7;8F;9;;;;-I"Jini#remove_path;F;:[[I" node;T0;[[@is;T;:remove_path;;;[;{;IC; "Removes node by name;T;[o;< ;=I" param;F;>I"name of node for removal;T;I" node;T;?[I" String;T;$@ o;< ;=I" return;F;>I"without a node;T;0;?[I" Jini;T;$@ ;![;"I"eRemoves node by name @param node [String] name of node for removal @return [Jini] without a node;T;#0;$@ ;%F;&o;';(F;)ip;*ir;+i;,@;@T;AI"Edef remove_path(node) Jini.new(@head.gsub("/#{node}", '')) end;T;BI"def remove_path(node);T;6To;7;8F;9;;;;-I"Jini#remove_attr;F;:[[I" name;T0;[[@i~;T;:remove_attr;;;[;{;IC; "PRemoves attr by name before: '/parent/child[@k="v"]' after: '/parent/child';T;[o;< ;=I" param;F;>I" of attr;T;I" name;T;?[I" String;T;$@'o;< ;=I" return;F;>I"without an attr;T;0;?[I" Jini;T;$@';![;"I"Removes attr by name before: '/parent/child[@k="v"]' after: '/parent/child' @param [String] name of attr @return [Jini] without an attr;T;#0;$@';%F;&o;';(F;)iw;*i};+i;,@;@T;AI"~def remove_attr(name) Jini.new( @head .gsub( /(\[@?#{name}="[^"]+"(\[\]+|\]))/, '' ) ) end;T;BI"def remove_attr(name);T;6To;7;8F;9;;;;-I" Jini#or;F;:[[I" first;T0[I" second;T0;[[@i;T;:or;;;[;{;IC; "Adds '|' to head;T;[o;< ;=I" param;F;>I"statement;T;I" first;T;?[I" String;T;$@Bo;< ;=I" param;F;>I"statement;T;I" second;T;?[I" String;T;$@Bo;< ;=I" return;F;>I"'with Jini '[first|second]' on tail;T;0;?[I" Jini;T;$@B;![;"I"Adds '|' to head @param [String] first statement @param [String] second statement @return [Jini] with Jini '[first|second]' on tail;T;#0;$@B;%F;&o;';(F;)i;*i;+i;,@;@T;AI"Idef or(first, second) Jini.new("#{@head}[#{first}|#{second}]") end;T;BI"def or(first, second);T;6To;7;8F;9;;;;-I" Jini#lt;F;:[[I"key;T0[I" value;T0;[[@i;T;:lt;;;[;{;IC; "1Less than. Addition '[node < value]' to tail;T;[o;< ;=I" param;F;>I" name;T;I"key;T;?[I" String;T;$@eo;< ;=I" param;F;>0;I" value;T;?[I" Object;T;$@eo;< ;=I" return;F;>I";T;0;?[I" Jini;T;$@e;![;"I"oLess than. Addition '[node < value]' to tail @param [String] key name @param [Object] value @return [Jini];T;#0;$@e;%F;&o;';(F;)i;*i;+i;,@;@T;AI"2def lt(key, value) sat('<', key, value) end;T;BI"def lt(key, value);T;6To;7;8F;9;;;;-I" Jini#gt;F;:[[I"key;T0[I" value;T0;[[@i;T;:gt;;;[;{;IC; "4Greater than. Addition '[node > value]' to tail;T;[o;< ;=I" param;F;>I" name;T;I"key;T;?[I" String;T;$@o;< ;=I" param;F;>0;I" value;T;?[I" Object;T;$@o;< ;=I" return;F;>I";T;0;?[I" Jini;T;$@;![;"I"rGreater than. Addition '[node > value]' to tail @param [String] key name @param [Object] value @return [Jini];T;#0;$@;%F;&o;';(F;)i;*i;+i;,@;@T;AI"2def gt(key, value) sat('>', key, value) end;T;BI"def gt(key, value);T;6To;7;8F;9;;: private;-I" Jini#sat;F;:[[I" action;T0[I"key;T0[I" value;T0;[[@i;T;:sat;;;[;{;IC; "Some action than.;T;[;![;"I"Some action than.;T;#0;$@;%F;&o;';(F;)i;*i;+i;,@;@T;AI"Vdef sat(action, key, value) Jini.new("#{@head}[#{key} #{action} #{value}]") end;T;BI" def sat(action, key, value);T;6T; @; IC;[; @; IC;[; @; IC;{;IC;{;T;IC;{;T;T;{;[;[[@i&;T;: Jini;;;;;[;{;IC; "It's a simple XPATH builder. ``` require 'jini' xpath = Jini.new('parent') .add_path(node: 'child') .add_path(node: 'toy') .to_s // body/child/toy ```;T;[;![;"I"It's a simple XPATH builder. ``` require 'jini' xpath = Jini.new('parent') .add_path(node: 'child') .add_path(node: 'toy') .to_s // body/child/toy ```;T;#0;$@;%F;&o;';(F;)i;*i%;+i;,@;-I" Jini;F;.o;/ ;00;10;20;: Object;,@;40;5;; @; IC;[; @; IC;[; @; IC;{;IC;{;T;IC;{;T;T;{;[;[;F;;;;;;;[;{;IC; " ;T;[;![;"@;#0;$@;+i;,0;-@;R@:Jini::InvalidPath@ :Jini#initialize@:Jini#to_s@;:Jini#add_path@N:Jini#add_attr@i:Jini#all_attr@: Jini#all@:Jini#add_all@: Jini#at@:Jini#selection@:Jini#remove_path@ :Jini#remove_attr@': Jini#or@B: Jini#lt@e: Jini#gt@: Jini#sat@