Module: IRXML

Extended by:
IRXML
Included in:
IRXML
Defined in:
lib/irxml.rb,
lib/irxml/edgar.rb,
lib/irxml/stock.rb

Defined Under Namespace

Modules: Edgar, Stock

Constant Summary collapse

URI =
'apps.shareholder.com'
BASE_PATH =
'/irxml/irxml.aspx'

Instance Method Summary collapse

Instance Method Details

#company_idObject



23
24
25
# File 'lib/irxml.rb', line 23

def company_id
  config[:company_id]
end

#company_id=(company_id) ⇒ Object



27
28
29
# File 'lib/irxml.rb', line 27

def company_id=(company_id)
  config[:company_id] = company_id
end

#configObject



15
16
17
# File 'lib/irxml.rb', line 15

def config
  @config ||= {}
end

#config=(hash) ⇒ Object



19
20
21
# File 'lib/irxml.rb', line 19

def config=(hash)
  @config = hash
end

#get(function, params = {}) ⇒ Object



35
36
37
# File 'lib/irxml.rb', line 35

def get(function, params = {})
  Nokogiri::XML(open('http://' + IRXML::URI + IRXML::BASE_PATH + get_params(params.merge('FUNCTION' => function))))
end

#pin=(pin) ⇒ Object



31
32
33
# File 'lib/irxml.rb', line 31

def pin=(pin)
  config[:pin] = pin
end