Module: Passtools

Defined in:
lib/passtools.rb,
lib/passtools/pass.rb,
lib/passtools/request.rb,
lib/passtools/version.rb,
lib/passtools/template.rb

Defined Under Namespace

Modules: Request Classes: Pass, Template

Constant Summary collapse

VERSION =
"0.4.6"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.api_keyObject

Returns the value of attribute api_key.



14
15
16
# File 'lib/passtools.rb', line 14

def api_key
  @api_key
end

.download_dirObject

Returns the value of attribute download_dir.



14
15
16
# File 'lib/passtools.rb', line 14

def download_dir
  @download_dir
end

.urlObject

Returns the value of attribute url.



14
15
16
# File 'lib/passtools.rb', line 14

def url
  @url
end

Class Method Details

.configure(opts = {}) ⇒ Object

Configure through hash



18
19
20
# File 'lib/passtools.rb', line 18

def self.configure(opts = {})
  opts.each {|k,v| instance_variable_set("@#{k}",v) }
end

.configure_from_file(pathname) ⇒ Object

Configure with yaml file



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

def self.configure_from_file(pathname)
  config = YAML::load(IO.read(pathname))
  configure(config)
end