.yardoc/objects/root.dat in jini-0.0.7 vs .yardoc/objects/root.dat in jini-0.0.8

- old
+ new

@@ -1,6 +1,6 @@ -{: rooto:"YARD::CodeObjects::RootObject:@childrenIC:&YARD::CodeObjects::CodeObjectList[o:#YARD::CodeObjects::ClassObject;IC;[o; ;IC;[: @owner@ +{: rooto:"YARD::CodeObjects::RootObject:@childrenIC:&YARD::CodeObjects::CodeObjectList[o:#YARD::CodeObjects::ClassObject;IC;[o; ;IC;[: @owner@ :@class_mixinsIC;[; @ :@instance_mixinsIC;[; @ :@attributesIC:SymbolHash{: @@ -18,161 +18,183 @@ @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"vMakes new object. By default it creates an empty path and you can ignore the head parameter. @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;:[;[[@i2;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;)i0;*i1;+i;,@;@T;AI"def to_s +end;T:@signatureI"def initialize(head = '');T;6To;7;8F;9;;;;-I"Jini#to_s;F;:[;[[@i3;T;: to_s;;;[;{;IC; "Convert it to a string.;T;[o;< +;=I" return;F;>I"xpath as string;T;0;?[I" String;T;$@;o;< +;=I" +raise;F;>I"&if contain spaces in simple nodes;T;0;?[I"InvalidPath;T;$@;;![;"I"tConvert it to a string. +@return [String] xpath as string +@raise [InvalidPath] if contain spaces in simple nodes;T;#0;$@;;%F;&o;';(F;)i0;*i2;+i;,@;@T;AI"def to_s + copy = @head.split(%r{//|/}) + copy.each do |node| + if !node.match(/[|]|@|=|>|</) && node.include?(' ') + raise InvalidPath, "Nodes can't contain spaces: #{node} – contain space." + end + end @head.to_s -end;T;BI" def to_s;T;6To;7;8F;9;;;;-I"Jini#add_node;F;:[[I" node;T0;[[@i9;T;: add_node;;;[;{;IC; "Additional node for xpath.;T;[o;< +end;T;BI" def to_s;T;6To;7;8F;9;;;;-I"Jini#add_node;F;:[[I" node;T0;[[@i@;T;: add_node;;;[;{;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;F;>I" node;T;I" node;T;?[I" String;T;$@So;< +;=I" return;F;>I" object;T;0;?[I" Jini;T;$@S;![;"I"OAdditional node for xpath. @param node [String] node -@return [Jini] object;T;#0;$@N;%F;&o;';(F;)i6;*i8;+i;,@;@T;AI":def add_node(node) +@return [Jini] object;T;#0;$@S;%F;&o;';(F;)i=;*i?;+i;,@;@T;AI":def add_node(node) Jini.new("#{@head}/#{node}") -end;T;BI"def add_node(node);T;6To;7;8F;9;;;;-I"Jini#add_attr;F;:[[I"key;T0[I" -value;T0;[[@iB;T;: add_attr;;;[;{;IC; "5Additional attribute for xpath. +end;T;BI"def add_node(node);T;6To;7;8F;9;;;;-I"Jini#add_property;F;:[[I" property;T0;[[@iI;T;:add_property;;;[;{;IC; "NAddition property in tail +Before: '../child' +After: '../child/property()';T;[o;< +;=I" +param;F;>I";T;I" property;T;?[I" String;T;$@no;< +;=I" return;F;>I" object;T;0;?[I" Jini;T;$@n;![;"I"}Addition property in tail +Before: '../child' +After: '../child/property()' +@param property [String] +@return [Jini] object;T;#0;$@n;%F;&o;';(F;)iD;*iH;+i;,@;@T;AI"Ndef add_property(property) + Jini.new(add_node("#{property}()").to_s) +end;T;BI"def add_property(property);T;6To;7;8F;9;;;;-I"Jini#add_attr;F;:[[I"key;T0[I" +value;T0;[[@iR;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;< +param;F;>I"name of attr;T;I"key;T;?[I" String;T;$@o;< ;=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. +value;T;?[I" String;T;$@o;< +;=I" return;F;>I" object;T;0;?[I" Jini;T;$@;![;"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=;*iA;+i;,@;@T;AI"Ndef add_attr(key, value) +@return [Jini] object;T;#0;$@;%F;&o;';(F;)iM;*iQ;+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;[[@iI;T;: all_attr;;;[;{;IC; "Adds an @value to xpath;T;[o;< +end;T;BI"def add_attr(key, value);T;6To;7;8F;9;;;;-I"Jini#add_attrs;F;:[[I" +value;T0;[[@iY;T;:add_attrs;;;[;{;IC; "Adds '@value' to tail;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 +value;T;?[I" String;T;$@o;< +;=I" return;F;>I" object;T;0;?[I" Jini;T;$@;![;"I"VAdds '@value' to tail @param value [String] with value attr -@return [Jini] object;T;#0;$@;%F;&o;';(F;)iF;*iH;+i;,@;@T;AI"<def all_attr(value) +@return [Jini] object;T;#0;$@;%F;&o;';(F;)iV;*iX;+i;,@;@T;AI"=def add_attrs(value) Jini.new("#{@head}@#{value}") -end;T;BI"def all_attr(value);T;6To;7;8F;9;;;;-I" Jini#all;F;:[;[[@iP;T;:all;;;[;{;IC; ">Xpath with all elements. +end;T;BI"def add_attrs(value);T;6To;7;8F;9;;;;-I" Jini#all;F;:[;[[@ia;T;:all;;;[;{;IC; ">Xpath with all elements. Addition an '*' to tail of xpath;T;[o;< -;=I" return;F;>I" object;T;0;?[I" Jini;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. +raise;F;>I""when method called after attr;T;0;?[I"InvalidPath;T;$@;![;"I"Xpath with all elements. Addition an '*' to tail of xpath -@return [Jini] object;T;#0;$@;%F;&o;';(F;)iM;*iO;+i;,@;@T;AI"{def all +@return [Jini] object +@raise [InvalidPath] when method called after attr;T;#0;$@;%F;&o;';(F;)i];*i`;+i;,@;@T;AI"{def all raise InvalidPath, 'You cannot add all tag after attr!' if @head[-1].eql?(']') Jini.new(add_node('*').to_s) -end;T;BI" def all;T;6To;7;8F;9;;;;-I"Jini#add_all;F;:[[I" node;T0;[[@iY;T;: add_all;;;[;{;IC; ">Xpath with all named elements. +end;T;BI" def all;T;6To;7;8F;9;;;;-I"Jini#add_nodes;F;:[[I" node;T0;[[@ij;T;:add_nodes;;;[;{;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. +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;)iU;*iX;+i;,@;@T;AI":def add_all(node) +@return [Jini] object;T;#0;$@;%F;&o;';(F;)if;*ii;+i;,@;@T;AI"<def add_nodes(node) Jini.new("#{@head}//#{node}") -end;T;BI"def add_all(node);T;6To;7;8F;9;;;;-I" Jini#at;F;:[[I" position;T0;[[@ia;T;:at;;;[;{;IC; "1Access by index. +end;T;BI"def add_nodes(node);T;6To;7;8F;9;;;;-I" Jini#at;F;:[[I" position;T0;[[@is;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;< +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. +raise;F;>I"%when method used after selection;T;0;?[I"InvalidPath;T;$@;![;"I"Access 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) +@return [Jini] object +@raise [InvalidPath] when method used after selection;T;#0;$@;%F;&o;';(F;)in;*ir;+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;:[;[[@ij;T;:selection;;;[;{;IC; "ZReplace all '/' to '::' symbols +end;T;BI"def at(position);T;6To;7;8F;9;;;;-I"Jini#selection;F;:[;[[@i|;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" 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 +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;)if;*ii;+i;,@;@T;AI"def selection +@raise [InvalidPath] when path can't present with select;T;#0;$@;%F;&o;';(F;)ix;*i{;+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_node;F;:[[I" node;T0;[[@it;T;:remove_node;;;[;{;IC; "Removes node by name;T;[o;< +end;T;BI"def selection;T;6To;7;8F;9;;;;-I"Jini#remove_node;F;:[[I" node;T0;[[@i;T;:remove_node;;;[;{;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;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;)iq;*is;+i;,@;@T;AI"Ddef remove_node(node) +@return [Jini] without a node;T;#0;$@-;%F;&o;';(F;)i~;*i;+i;,@;@T;AI"Ddef remove_node(node) Jini.new( purge("/#{node}") ) -end;T;BI"def remove_node(node);T;6To;7;8F;9;;;;-I"Jini#remove_attr;F;:[[I" name;T0;[[@i|;T;:remove_attr;;;[;{;IC; "PRemoves attr by name +end;T;BI"def remove_node(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 +param;F;>I" of attr;T;I" name;T;?[I" String;T;$@Ho;< +;=I" return;F;>I"without an attr;T;0;?[I" Jini;T;$@H;![;"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;)iz;*i{;+i;,@;@T;AI"[def remove_attr(name) +@return [Jini] without an attr;T;#0;$@H;%F;&o;';(F;)i;*i;+i;,@;@T;AI"[def remove_attr(name) Jini.new( purge(/(\[@?#{name}="[^"]+"(\[\]+|\]))/) ) end;T;BI"def remove_attr(name);T;6To;7;8F;9;;;;-I" Jini#or;F;:[[I" -alpha;T0[I" beta;T0;[[@i;T;:or;;;[;{;IC; "Adds '|' to head;T;[o;< +alpha;T0[I" beta;T0;[[@i;T;:or;;;[;{;IC; "#Adds '[alpha | beta]' in tail.;T;[o;< ;=I" param;F;>I"statement;T;I" -alpha;T;?[I" String;T;$@Bo;< +alpha;T;?[I" String;T;$@co;< ;=I" -param;F;>I"statement;T;I" beta;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;F;>I"statement;T;I" beta;T;?[I" String;T;$@co;< +;=I" return;F;>I""with '[first|second]' on tail;T;0;?[I" Jini;T;$@c;![;"I"Adds '[alpha | beta]' in tail. @param [String] alpha statement @param [String] beta statement -@return [Jini] with Jini '[first|second]' on tail;T;#0;$@B;%F;&o;';(F;)i;*i;+i;,@;@T;AI"?def or(alpha, beta) +@return [Jini] with '[first|second]' on tail;T;#0;$@c;%F;&o;';(F;)i;*i;+i;,@;@T;AI"?def or(alpha, beta) action_between('|', alpha, beta) end;T;BI"def or(alpha, beta);T;6To;7;8F;9;;;;-I" Jini#lt;F;:[[I"key;T0[I" -value;T0;[[@i;T;:lt;;;[;{;IC; "1Less than. +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;< +param;F;>I" name;T;I"key;T;?[I" String;T;$@o;< ;=I" param;F;>0;I" -value;T;?[I" Object;T;$@eo;< -;=I" return;F;>I";T;0;?[I" Jini;T;$@e;![;"I"oLess than. +value;T;?[I" Object;T;$@o;< +;=I" return;F;>I";T;0;?[I" Jini;T;$@;![;"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"=def lt(key, value) +@return [Jini];T;#0;$@;%F;&o;';(F;)i;*i;+i;,@;@T;AI"=def lt(key, value) action_between('<', 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. +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;< +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. +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"=def gt(key, value) +@return [Jini];T;#0;$@;%F;&o;';(F;)i;*i;+i;,@;@T;AI"=def gt(key, value) action_between('>', key, value) end;T;BI"def gt(key, value);T;6To;7;8F;9;;: private;-I"Jini#action_between;F;:[[I" action;T0[I" -alpha;T0[I" beta;T0;[[@i;T;:action_between;;;[;{;IC; "(Some action between two statements.;T;[;![;"I"(Some action between two statements.;T;#0;$@;%F;&o;';(F;)i;*i;+i;,@;@T;AI"cdef action_between(action, alpha, beta) +alpha;T0[I" beta;T0;[[@i;T;:action_between;;;[;{;IC; "(Some action between two statements.;T;[;![;"I"(Some action between two statements.;T;#0;$@;%F;&o;';(F;)i;*i;+i;,@;@T;AI"cdef action_between(action, alpha, beta) Jini.new("#{@head}[#{alpha} #{action} #{beta}]") -end;T;BI",def action_between(action, alpha, beta);T;6To;7;8F;9;;;P;-I"Jini#purge;F;:[[I" -token;T0;[[@i;T;: +end;T;BI",def action_between(action, alpha, beta);T;6To;7;8F;9;;;Q;-I"Jini#purge;F;:[[I" +token;T0;[[@i;T;: purge;;;[;{;IC; ";T;[o;< ;=I" param;F;>I"to be purged from the head;T;I" -token;T;?[I"Regexp | String;T;$@;![;"I">@param [Regexp | String] token to be purged from the head;T;#0;$@;%F;&o;';(F;)i;*i;+i;,@;@T;AI"1def purge(token) +token;T;?[I"Regexp | String;T;$@;![;"I">@param [Regexp | String] token to be purged from the head;T;#0;$@;%F;&o;';(F;)i;*i;+i;,@;@T;AI"1def purge(token) @head.gsub(token, '') end;T;BI"def purge(token);T;6T; @; IC;[; @; IC;[; @; IC;{;IC;{;T;IC;{;T;T;{;[;[[@i%;T;: Jini;;;;;[;{;IC; "It's a simple XPATH builder. @@ -188,7 +210,7 @@ .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;-@;S@:Jini::InvalidPath@ -:Jini#initialize@:Jini#to_s@;:Jini#add_node@N:Jini#add_attr@i:Jini#all_attr@: Jini#all@:Jini#add_all@: Jini#at@:Jini#selection@:Jini#remove_node@ :Jini#remove_attr@': Jini#or@B: Jini#lt@e: Jini#gt@:Jini#action_between@:Jini#purge@ +@; IC;{;IC;{;T;IC;{;T;T;{;[;[;F;;;;;;;[;{;IC; " ;T;[;![;"I";T;#0;$@;+i;,0;-@;T@:Jini::InvalidPath@ +:Jini#initialize@:Jini#to_s@;:Jini#add_node@S:Jini#add_property@n:Jini#add_attr@:Jini#add_attrs@: Jini#all@:Jini#add_nodes@: Jini#at@:Jini#selection@:Jini#remove_node@-:Jini#remove_attr@H: Jini#or@c: Jini#lt@: Jini#gt@:Jini#action_between@:Jini#purge@ \ No newline at end of file