Class: RSimpy::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(storage_service) ⇒ Configuration

Returns a new instance of Configuration.



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

def initialize storage_service
  @storage_service = storage_service
end

Instance Attribute Details

#user=(value) ⇒ Object (writeonly)

Sets the attribute user

Parameters:

  • value

    the value to set the attribute user to.



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

def user=(value)
  @user = value
end

Instance Method Details

#getObject



17
18
19
# File 'lib/configuration.rb', line 17

def get
  @storage_service.get
end

#saveObject



13
14
15
# File 'lib/configuration.rb', line 13

def save
  @storage_service.save @user
end

#stored?Boolean

Returns:

  • (Boolean)


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

def stored?
  @storage_service.stored?
end