Class: YaCan::Morphem::Result

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml) ⇒ Result

Returns a new instance of Result.



26
27
28
29
30
31
# File 'lib/yacan/morphem.rb', line 26

def initialize(xml)
  @xml = xml
  wrapped = Nokogiri::XML(xml)
  @ma_result = MaOrUniq.new(wrapped.at('ma_result'))
  @uniq_result = MaOrUniq.new(wrapped.at('uniq_result'))
end

Instance Attribute Details

#ma_resultObject (readonly)

Returns the value of attribute ma_result.



32
33
34
# File 'lib/yacan/morphem.rb', line 32

def ma_result
  @ma_result
end

#uniq_resultObject (readonly)

Returns the value of attribute uniq_result.



32
33
34
# File 'lib/yacan/morphem.rb', line 32

def uniq_result
  @uniq_result
end

#xmlObject (readonly)

Returns the value of attribute xml.



32
33
34
# File 'lib/yacan/morphem.rb', line 32

def xml
  @xml
end