Class: Forte::Keyfile
- Inherits:
-
Object
- Object
- Forte::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.
4 5 6 |
# File 'lib/forte/keyfile.rb', line 4 def initialize(path) @path = path end |
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path.
3 4 5 |
# File 'lib/forte/keyfile.rb', line 3 def path @path end |
Instance Method Details
#body ⇒ Object
12 13 14 |
# File 'lib/forte/keyfile.rb', line 12 def body IO.read(path) end |
#description ⇒ Object
8 9 10 |
# File 'lib/forte/keyfile.rb', line 8 def description File.basename(path, '.*') end |