From 842cf74d34c9fe95c43449c2d662cd0fc19b25f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 26 Jun 2012 16:25:35 +0200 Subject: Particle,Link: use @raise yard tag --- lib/edoors/link.rb | 2 ++ lib/edoors/particle.rb | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/lib/edoors/link.rb b/lib/edoors/link.rb index 8676979..ede2cd4 100644 --- a/lib/edoors/link.rb +++ b/lib/edoors/link.rb @@ -64,6 +64,8 @@ module Edoors # # @param [Hash] o belongs to JSON parser # + # @raise Edoors::Exception if the json kls attribute is wrong + # def self.json_create o raise Edoors::Exception.new "JSON #{o['kls']} != #{self.name}" if o['kls'] != self.name self.new o['src'], o['dsts'], o['keys'], o['value'] diff --git a/lib/edoors/particle.rb b/lib/edoors/particle.rb index 983af01..c7244d0 100644 --- a/lib/edoors/particle.rb +++ b/lib/edoors/particle.rb @@ -104,6 +104,8 @@ module Edoors # # @param [Hash] o belongs to JSON parser # + # @raise Edoors::Exception if the json kls attribute is wrong + # def self.json_create o raise Edoors::Exception.new "JSON #{o['kls']} != #{self.name}" if o['kls'] != self.name self.new o @@ -151,6 +153,8 @@ module Edoors # # @param [Array] dsts destinations to add # + # @raise Edoors::Exception if a destination is not acceptable + # # The parameters are checked before beeing added. # they must not be empty or be '?' or start with '/' # or contain '/?' or '//' or '\s+' -- cgit v1.1-2-g2b99