class Sec::Firms::FirmEntryParser
Attributes
updated_at[R]
Public Class Methods
new(xml_str, updated_at)
click to toggle source
Calls superclass method
# File lib/sec/firms/firm_entry_parser.rb, line 6 def initialize(xml_str, updated_at) super(xml_str) if xml_str @updated_at = updated_at end
Public Instance Methods
to_hash()
click to toggle source
# File lib/sec/firms/firm_entry_parser.rb, line 11 def to_hash data = Hash.from_xml(doc.to_s)['edgarSubmission']['formData'] rescue nil return {} unless data data = Helpers::transform_hash(data) do |hash, key, value| hash[key] = default_values(value) end end
Private Instance Methods
default_values(value)
click to toggle source
# File lib/sec/firms/firm_entry_parser.rb, line 22 def default_values(value) { value: value, updated_at: updated_at } end