test/mocks/dictionaries.rb in Empact-roxml-2.5.1 vs test/mocks/dictionaries.rb in Empact-roxml-2.5.2
- old
+ new
@@ -2,55 +2,56 @@
class DictionaryOfAttrs
include ROXML
xml_name :dictionary
- xml_reader :definitions, {:attrs => [:dt, :dd]}, :in => :definitions
+ xml_reader :definitions, :as => {:key => '@dt',
+ :value => '@dd'}, :in => :definitions
end
class DictionaryOfTexts
include ROXML
xml_name :dictionary
- xml_reader :definitions, {:key => :word,
+ xml_reader :definitions, :as => {:key => :word,
:value => :meaning}
end
class DictionaryOfMixeds
include ROXML
xml_name :dictionary
- xml_reader :definitions, {:key => {:attr => :word},
+ xml_reader :definitions, :as => {:key => '@word',
:value => :content}
end
class DictionaryOfNames
include ROXML
xml_name :dictionary
- xml_reader :definitions, {:key => :name,
+ xml_reader :definitions, :as => {:key => :name,
:value => :content}
end
class DictionaryOfGuardedNames
include ROXML
xml_name :dictionary
- xml_reader :definitions, {:key => :name,
+ xml_reader :definitions, :as => {:key => :name,
:value => :content}, :in => :definitions
end
class DictionaryOfNameClashes
include ROXML
xml_name :dictionary
- xml_reader :definitions, {:key => 'name',
+ xml_reader :definitions, :as => {:key => 'name',
:value => 'content'}, :from => :definition
end
class DictionaryOfAttrNameClashes
include ROXML
xml_name :dictionary
- xml_reader :definitions, {:key => {:attr => :name},
+ xml_reader :definitions, :as => {:key => '@name',
:value => 'content'}, :from => :definition
end
\ No newline at end of file