Class: Senju::Credentials

Inherits:
Object
  • Object
show all
Defined in:
lib/senju/credentials.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filepath = nil) ⇒ Credentials

Returns a new instance of Credentials.



4
5
6
7
# File 'lib/senju/credentials.rb', line 4

def initialize(filepath = nil)
  filepath ||= Dir.home + '/.senju/credentials'
  @data = YAML.load_file(filepath)
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



3
4
5
# File 'lib/senju/credentials.rb', line 3

def data
  @data
end

Instance Method Details

#[](conf) ⇒ Object



9
10
11
# File 'lib/senju/credentials.rb', line 9

def [](conf)
  @data[conf]
end