class SecEdgar::Entity

Constants

COLUMNS

Public Class Methods

new(entity) click to toggle source
# File lib/sec_edgar/entity.rb, line 22
def initialize(entity)
  COLUMNS.each do |column|
    instance_variable_set("@#{ column }", entity[column.to_s])
  end
end
query(url) click to toggle source
# File lib/sec_edgar/entity.rb, line 36
def self.query(url)
  RestClient.get(url) do |response, request, result, &block|
    case response.code
    when 200
      return response
    else
      response.return!(request, result, &block)
    end
  end
end

Public Instance Methods

filings() click to toggle source
# File lib/sec_edgar/entity.rb, line 28
def filings
  SecEdgar::Filing.find(@cik)
end
transactions() click to toggle source
# File lib/sec_edgar/entity.rb, line 32
def transactions
  SecEdgar::Transaction.find(@cik)
end