{: 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;:[;[[@i/;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-;*i.;+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;[[@i6;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;)i3;*i5;+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;[[@i?;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;[[@iF;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;)iC;*iE;+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;)iJ;*iL;+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;[[@iV;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;)iR;*iU;+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;$@Õ;![;"I"hAccess by index. Addition '[index]' to xpath @param position [Integer] number @return [Jini] object;T;#0;$@Õ;%F;&o;';(F;)iZ;*i];+i;,@;@T;AI"=def at(position) Jini.new("#{@head}[#{position}]") end;T;BI"def at(position);T;6To;7;8F;9;;;;-I"Jini#selection;F;:[;[[@ie;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;$@ð;![;"I"sReplace all '/' to '::' symbols if path doesn't contain invalid symbols for selection @return [Jini] selection;T;#0;$@ð;%F;&o;';(F;)ib;*id;+i;,@;@T;AI"Çdef selection if @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;[[@io;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;)il;*in;+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;[[@iz;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;)is;*iy;+i;,@;@T;AI"~def remove_attr(name) Jini.new( @head .gsub( /(\[@?#{name}="[^"]+"(\[\]+|\]))/, '' ) ) end;T;BI"def remove_attr(name);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('body') .add_path(node: 'child') .add_path(node: 'child') .to_s // /body/child/child;T;[;![;"I"—It's a simple XPATH builder. require 'jini' xpath = Jini.new('body') .add_path(node: 'child') .add_path(node: 'child') .to_s // /body/child/child;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;-@²;M@: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@