Class: Chem::TinkerNucleic
- Inherits:
-
Object
- Object
- Chem::TinkerNucleic
- Defined in:
- lib/chem/appl/tinker/nucleic.rb
Instance Attribute Summary collapse
-
#io ⇒ Object
readonly
Returns the value of attribute io.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
- #exec ⇒ Object
-
#initialize(cmd_line) ⇒ TinkerNucleic
constructor
A new instance of TinkerNucleic.
Constructor Details
#initialize(cmd_line) ⇒ TinkerNucleic
Returns a new instance of TinkerNucleic.
22 23 24 |
# File 'lib/chem/appl/tinker/nucleic.rb', line 22 def initialize(cmd_line) @cmd_line = cmd_line + ' -stdout' end |
Instance Attribute Details
#io ⇒ Object (readonly)
Returns the value of attribute io.
35 36 37 |
# File 'lib/chem/appl/tinker/nucleic.rb', line 35 def io @io end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
35 36 37 |
# File 'lib/chem/appl/tinker/nucleic.rb', line 35 def result @result end |
Instance Method Details
#exec ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/chem/appl/tinker/nucleic.rb', line 26 def exec begin @io = IO.popen(@cmd_line, "w+") @result = @io.read return @result ensure @io.close end end |