Class: YmaParser::WordType

Inherits:
Object
  • Object
show all
Defined in:
lib/yma_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, xml) ⇒ WordType

Returns a new instance of WordType.



58
59
60
61
62
63
64
65
66
67
68
# File 'lib/yma_parser.rb', line 58

def initialize(type, xml)
  @xml = xml

  if type==:uniq_result
    self.instance_eval do
      def count
        element(:count)
      end
    end
  end
end

Instance Attribute Details

#xmlObject (readonly)

Returns the value of attribute xml.



56
57
58
# File 'lib/yma_parser.rb', line 56

def xml
  @xml
end

Instance Method Details

#baseformObject



82
83
84
# File 'lib/yma_parser.rb', line 82

def baseform
  element(:baseform)
end

#featureObject



86
87
88
# File 'lib/yma_parser.rb', line 86

def feature
  element(:feature)
end

#posObject



78
79
80
# File 'lib/yma_parser.rb', line 78

def pos
  element(:pos)
end

#readingObject



74
75
76
# File 'lib/yma_parser.rb', line 74

def reading
  element(:reading)
end

#surfaceObject



70
71
72
# File 'lib/yma_parser.rb', line 70

def surface
  element(:surface)
end