Class: Gas::Settings

Inherits:
Object
  • Object
show all
Defined in:
lib/gas/settings.rb

Overview

Class that contains settings for the app

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSettings

Returns a new instance of Settings.



8
9
10
11
12
13
# File 'lib/gas/settings.rb', line 8

def initialize
  @base_dir = '~'
  @gas_dir = "#{@base_dir}/.gas"
  @ssh_dir = "#{@base_dir}/.ssh"
  @github_server = 'api.github.com'
end

Instance Attribute Details

#base_dirObject

Returns the value of attribute base_dir.



5
6
7
# File 'lib/gas/settings.rb', line 5

def base_dir
  @base_dir
end

#gas_dirObject

Returns the value of attribute gas_dir.



6
7
8
# File 'lib/gas/settings.rb', line 6

def gas_dir
  @gas_dir
end

#github_serverObject

Returns the value of attribute github_server.



5
6
7
# File 'lib/gas/settings.rb', line 5

def github_server
  @github_server
end

#ssh_dirObject

Returns the value of attribute ssh_dir.



6
7
8
# File 'lib/gas/settings.rb', line 6

def ssh_dir
  @ssh_dir
end

Instance Method Details

#configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (Gas::Settings)

    the object that the method was called on



15
16
17
# File 'lib/gas/settings.rb', line 15

def configure
  yield self if block_given?
end