Class: GoogleAPI::Config
- Inherits:
-
Object
- Object
- GoogleAPI::Config
- Defined in:
- lib/google_api/config.rb
Instance Attribute Summary collapse
- #keys ⇒ Object
-
#root ⇒ Object
Returns the value of attribute root.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ Config
constructor
A new instance of Config.
- #local_path(*path) ⇒ Object
Constructor Details
Instance Attribute Details
#keys ⇒ Object
14 15 16 |
# File 'lib/google_api/config.rb', line 14 def keys @keys || root end |
#root ⇒ Object
Returns the value of attribute root.
5 6 7 |
# File 'lib/google_api/config.rb', line 5 def root @root end |
Instance Method Details
#local_path(*path) ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/google_api/config.rb', line 18 def local_path(*path) basepath = block_given? ? yield(self) : root fullpath = File.join(basepath, *path) paths = fullpath.split('/') filename = paths.pop path = File.join(*paths) FileUtils.mkdir_p(path) File.join(path, filename) end |