class ANN_Report
Public Class Methods
new(ann_report)
click to toggle source
initialize and build access methods
# File lib/ann_wrapper/ann_report.rb, line 5 def initialize(ann_report) @id, @type, @name, @precision, @vintage = "" @ann_report = ann_report self.instance_variables.each do |iv| var_name = iv[1..-1] create_method(var_name) { get_info_on(var_name) } end end
Public Instance Methods
get_info_on(var_name)
click to toggle source
get info from xml
# File lib/ann_wrapper/ann_report.rb, line 16 def get_info_on(var_name) body = @ann_report.at_xpath(var_name) body.content unless body.nil? end
to_h()
click to toggle source
@return [Hash] hash of self
# File lib/ann_wrapper/ann_report.rb, line 22 def to_h # create hash excluding some methods to_hash([:to_h, :ann_report, :get_info_on]) end