Sha256: 74084d596b3f98742eb3cada8dbe6310a5c27dddc54f11ddc171536c8763ed0e

Contents?: true

Size: 1.2 KB

Versions: 19

Compression:

Stored size: 1.2 KB

Contents

require 'lib/roxml'

class DictionaryOfAttrs
  include ROXML

  xml_name :dictionary
  xml_reader :definitions, {:attrs => [:dt, :dd]}, :in => :definitions
end

class DictionaryOfTexts
  include ROXML

  xml_name :dictionary
  xml_reader :definitions, {:key => :word,
                            :value => :meaning}
end

class DictionaryOfMixeds
  include ROXML

  xml_name :dictionary
  xml_reader :definitions, {:key => {:attr => :word},
                            :value => :content}
end

class DictionaryOfNames
  include ROXML

  xml_name :dictionary
  xml_reader :definitions, {:key => :name,
                            :value => :content}
end

class DictionaryOfGuardedNames
  include ROXML

  xml_name :dictionary
  xml_reader :definitions, {:key => :name,
                            :value => :content}, :in => :definitions
end

class DictionaryOfNameClashes
  include ROXML

  xml_name :dictionary
  xml_reader :definitions, {:key => 'name',
                            :value => 'content'}, :from => :definition
end

class DictionaryOfAttrNameClashes
  include ROXML

  xml_name :dictionary
  xml_reader :definitions, {:key => {:attr => :name},
                            :value => 'content'}, :from => :definition
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
Empact-roxml-2.0 test/mocks/dictionaries.rb
Empact-roxml-2.1 test/mocks/dictionaries.rb
Empact-roxml-2.2 test/mocks/dictionaries.rb
Empact-roxml-2.3.0 test/mocks/dictionaries.rb
Empact-roxml-2.3.1 test/mocks/dictionaries.rb
Empact-roxml-2.4.0 test/mocks/dictionaries.rb
Empact-roxml-2.4.1 test/mocks/dictionaries.rb
Empact-roxml-2.4.2 test/mocks/dictionaries.rb
Empact-roxml-2.4.3 test/mocks/dictionaries.rb
Empact-roxml-2.5.1 test/mocks/dictionaries.rb
roxml-2.4.0 test/mocks/dictionaries.rb
roxml-2.3.2 test/mocks/dictionaries.rb
roxml-2.4.3 test/mocks/dictionaries.rb
roxml-2.4.2 test/mocks/dictionaries.rb
roxml-2.5.0 test/mocks/dictionaries.rb
roxml-2.4.1 test/mocks/dictionaries.rb
roxml-2.5.1 test/mocks/dictionaries.rb
roxml-2.5.2 test/mocks/dictionaries.rb
roxml-2.5.3 test/mocks/dictionaries.rb