Class: Forte::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.



4
5
6
# File 'lib/forte/keyfile.rb', line 4

def initialize(path)
  @path = path
end

Instance Attribute Details

#pathObject

Returns the value of attribute path.



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

def path
  @path
end

Instance Method Details

#bodyObject



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

def body
  IO.read(path)
end

#descriptionObject



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

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