Class: Grifork::Config::Grifork
- Inherits:
-
Object
- Object
- Grifork::Config::Grifork
- Defined in:
- lib/grifork/config.rb
Instance Attribute Summary collapse
-
#cmd ⇒ Object
readonly
Returns the value of attribute cmd.
-
#dir ⇒ Object
readonly
Returns the value of attribute dir.
-
#login ⇒ Object
readonly
Returns the value of attribute login.
Instance Method Summary collapse
- #chdir(path) ⇒ Object private
- #exec(cmd) ⇒ Object private
-
#initialize(&config) ⇒ Grifork
constructor
A new instance of Grifork.
- #tmpdir(path) ⇒ Object private
- #user(login) ⇒ Object private
- #workdir ⇒ Object
Constructor Details
#initialize(&config) ⇒ Grifork
Returns a new instance of Grifork.
106 107 108 |
# File 'lib/grifork/config.rb', line 106 def initialize(&config) instance_eval(&config) end |
Instance Attribute Details
#cmd ⇒ Object (readonly)
Returns the value of attribute cmd.
104 105 106 |
# File 'lib/grifork/config.rb', line 104 def cmd @cmd end |
#dir ⇒ Object (readonly)
Returns the value of attribute dir.
104 105 106 |
# File 'lib/grifork/config.rb', line 104 def dir @dir end |
#login ⇒ Object (readonly)
Returns the value of attribute login.
104 105 106 |
# File 'lib/grifork/config.rb', line 104 def login @login end |
Instance Method Details
#chdir(path) ⇒ Object (private)
120 121 122 |
# File 'lib/grifork/config.rb', line 120 def chdir(path) @dir = path end |
#exec(cmd) ⇒ Object (private)
124 125 126 |
# File 'lib/grifork/config.rb', line 124 def exec(cmd) @cmd = cmd end |
#tmpdir(path) ⇒ Object (private)
128 129 130 |
# File 'lib/grifork/config.rb', line 128 def tmpdir(path) @tmpdir = path end |
#user(login) ⇒ Object (private)
116 117 118 |
# File 'lib/grifork/config.rb', line 116 def user(login) @login = login end |
#workdir ⇒ Object
110 111 112 |
# File 'lib/grifork/config.rb', line 110 def workdir @tmpdir || Dir.tmpdir end |