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
-
.api_key ⇒ Object
Returns the value of attribute api_key.
-
.download_dir ⇒ Object
Returns the value of attribute download_dir.
-
.url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
-
.configure(opts = {}) ⇒ Object
Configure through hash.
-
.configure_from_file(pathname) ⇒ Object
Configure with yaml file.
Class Attribute Details
.api_key ⇒ Object
Returns the value of attribute api_key.
14 15 16 |
# File 'lib/passtools.rb', line 14 def api_key @api_key end |
.download_dir ⇒ Object
Returns the value of attribute download_dir.
14 15 16 |
# File 'lib/passtools.rb', line 14 def download_dir @download_dir end |
.url ⇒ Object
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 |