Module: Sapphire::DSL::Configuration

Included in:
Sapphire
Defined in:
lib/sapphire/DSL/Configuration/Use.rb,
lib/sapphire/DSL/Configuration/ConfiguredUser.rb,
lib/sapphire/DSL/Configuration/ConfiguredBrowser.rb

Defined Under Namespace

Classes: ConfigurationBrowser, ConfiguredUser

Instance Method Summary collapse

Instance Method Details

#configured_userObject



4
5
6
# File 'lib/sapphire/DSL/Configuration/ConfiguredUser.rb', line 4

def configured_user
  $user
end

#ConfiguredBrowser(url) ⇒ Object



4
5
6
7
# File 'lib/sapphire/DSL/Configuration/ConfiguredBrowser.rb', line 4

def ConfiguredBrowser(url)
  @rootUrl = url
  ConfigurationBrowser
end

#Use(user) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/sapphire/DSL/Configuration/Use.rb', line 4

def Use(user)
  if(user == ConfiguredUser)
    if AppConfig.Current.nil?
      raise "No App Config defined!"
    end
    $user = AppConfig.new().User
  else
    $user = user.new
  end
end