Class: Keyfile
- Inherits:
-
Object
- Object
- Keyfile
- Defined in:
- lib/forte/keyfile.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
- #body ⇒ Object
- #description ⇒ Object
-
#initialize(path) ⇒ Keyfile
constructor
A new instance of Keyfile.
Constructor Details
#initialize(path) ⇒ Keyfile
Returns a new instance of Keyfile.
3 4 5 |
# File 'lib/forte/keyfile.rb', line 3 def initialize(path) @path = path end |
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path.
2 3 4 |
# File 'lib/forte/keyfile.rb', line 2 def path @path end |
Instance Method Details
#body ⇒ Object
11 12 13 |
# File 'lib/forte/keyfile.rb', line 11 def body IO.read(path) end |
#description ⇒ Object
7 8 9 |
# File 'lib/forte/keyfile.rb', line 7 def description File.basename(path, '.*') end |