Module: Cloudpassage::Pry
- Defined in:
- lib/cloudpassage/pry.rb
Overview
Module to make it easy to use stuff from pry (or any sort of interactive debugger)
Class Method Summary collapse
Class Method Details
.cloudpassage(type) ⇒ Object
6 7 8 9 |
# File 'lib/cloudpassage/pry.rb', line 6 def self.cloudpassage(type) type_section = Cloudpassage::Pry::section(type) Cloudpassage::Api.new(Cloudpassage.token(type_section['id'], type_section['secret'])) end |
.config_file ⇒ Object
19 20 21 |
# File 'lib/cloudpassage/pry.rb', line 19 def self.config_file ENV.fetch('CLOUDPASSAGE_CONFIG_FILE', "#{ENV['HOME']}/.cloudpassagerc") end |
.section(type) ⇒ Object
11 12 13 |
# File 'lib/cloudpassage/pry.rb', line 11 def self.section(type) yaml.fetch(type.to_s) end |
.yaml ⇒ Object
15 16 17 |
# File 'lib/cloudpassage/pry.rb', line 15 def self.yaml @yaml ||= YAML.load(File.read(config_file)) end |