Sha256: c9d463ec6d4b4897020125b05c9f99b793c717d137894dc7654eb09d75354896

Contents?: true

Size: 511 Bytes

Versions: 3

Compression:

Stored size: 511 Bytes

Contents

require 'rubygems'
require 'thor'
require 'thor/group'
require 'yaml'
require 'rest_client'


module Factor
  module CLI
    class Command < Thor
      CONFIG_FILE_DIR = File.expand_path("~/.factor") 
      no_tasks do
        def save_config(config)
          File.open(CONFIG_FILE_DIR,'w') do |file|
            YAML::dump(config,file)
          end
        end
    
        def get_config
          File.exists?(CONFIG_FILE_DIR) ? YAML::load_file(CONFIG_FILE_DIR) : {}
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
factor-0.0.6 lib/cli/command.rb
factor-0.0.5 lib/cli/command.rb
factor-0.0.4 lib/cli/command.rb