Class: Keyfile

Inherits:
Object
  • Object
show all
Defined in:
lib/forte/keyfile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#pathObject

Returns the value of attribute path.



2
3
4
# File 'lib/forte/keyfile.rb', line 2

def path
  @path
end

Instance Method Details

#bodyObject



11
12
13
# File 'lib/forte/keyfile.rb', line 11

def body
  IO.read(path)
end

#descriptionObject



7
8
9
# File 'lib/forte/keyfile.rb', line 7

def description
  File.basename(path, '.*')
end