Class: Chemlab::Configuration
- Inherits:
-
Object
- Object
- Chemlab::Configuration
- Extended by:
- Forwardable
- Includes:
- Attributable, Runtime::Logger
- Defined in:
- lib/chemlab/configuration.rb
Overview
Chemlab Configuration
Constant Summary collapse
- BANNER =
Chemlab Terminal Banner
"\n ## ##\n #### ####\n ###### ######\n ####### #######\n ######## #########\n ########## #########\n ########## ###########\n ############ ############\n ##########/------------------------------------------\\#########\n ##########/ / ___| |__ ___ _ __ ___ | | __ _| |__ \\#########\n #########| | | | '_ \\ / _ \\ '_ ` _ \\| |/ _` | '_ \\ |########\n ##########| | |___| | | | __/ | | | | | | (_| | |_) | |#########\n ###########\\ \\____|_| |_|\\___|_| |_| |_|_|\\__,_|_.__/ /###########\n #############\\------------------------------------------/#############\n \\*********************############################********************/\n \\\\\\********************##########################********************///\n \\\\\\\\\\\\******************#########################*******************//////\n \\\\\\\\\\\\\\\\******************########################******************////////\n \\\\\\\\\\\\\\\\\\\\*****************######################*****************//////////\n \\\\\\\\\\\\\\\\\\\\\\\\****************#####################****************/////////////\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\***************####################***************///////////////\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\***************##################**************/////////////////\n \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*************#################**************/////////////////\n \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*************################************////////////////\n \\\\\\\\\\\\\\\\\\\\\\\\\\\\************##############************//////////////\n \\\\\\\\\\\\\\\\\\\\\\\\\\\\**********#############***********/////////////\n \\\\\\\\\\\\\\\\\\\\\\\\**********############**********////////////\n \\\\\\\\\\\\\\\\\\\\\\********###########*********///////////\n \\\\\\\\\\\\\\\\\\********#########********//////////\n \\\\\\\\\\\\\\\\\\*******########*******////////\n \\\\\\\\\\\\\\*******######******////////\n \\\\\\\\\\\\*****######*****//////\n \\\\\\\\\\****####****/////\n \\\\\\\\***###***////\n \\\\\\**##**///\n \\****/\n **\n"
Instance Attribute Summary collapse
-
#browser ⇒ Object
Returns the value of attribute browser.
-
#libraries ⇒ Object
Returns the value of attribute libraries.
Instance Method Summary collapse
-
#configure_rspec ⇒ Object
Call RSpec.configure for additional configuration.
-
#initialize {|_self| ... } ⇒ Configuration
constructor
A new instance of Configuration.
Methods included from Attributable
Methods included from Runtime::Logger
Constructor Details
#initialize {|_self| ... } ⇒ Configuration
Returns a new instance of Configuration.
52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/chemlab/configuration.rb', line 52 def initialize yield self if block_given? log(BANNER, :begn) unless log("\n ==> Base URL: \#{base_url}\n ==> Browser: \#{browser}\n ==> Libraries: \#{libraries}\n CONF\nend\n", :conf) |
Instance Attribute Details
#browser ⇒ Object
Returns the value of attribute browser.
72 73 74 |
# File 'lib/chemlab/configuration.rb', line 72 def browser @browser end |
#libraries ⇒ Object
Returns the value of attribute libraries.
72 73 74 |
# File 'lib/chemlab/configuration.rb', line 72 def libraries @libraries end |
Instance Method Details
#configure_rspec ⇒ Object
Call RSpec.configure for additional configuration
89 90 91 92 93 94 95 96 97 |
# File 'lib/chemlab/configuration.rb', line 89 def configure_rspec RSpec.configure do |rspec| yield rspec if block_given? rspec.after(:each) do Chemlab.configuration.browser&.session&.engine&.quit end end end |