Class: Jasmine::Configuration
- Inherits:
-
Object
- Object
- Jasmine::Configuration
- Defined in:
- lib/jasmine/configuration.rb
Instance Attribute Summary collapse
-
#boot_dir ⇒ Object
Returns the value of attribute boot_dir.
-
#boot_files ⇒ Object
writeonly
Sets the attribute boot_files.
-
#boot_path ⇒ Object
Returns the value of attribute boot_path.
-
#browser ⇒ Object
TODO: these are largely client concerns, move them.
- #css_files ⇒ Object
-
#host ⇒ Object
TODO: these are largely client concerns, move them.
-
#jasmine_css_files ⇒ Object
writeonly
Sets the attribute jasmine_css_files.
-
#jasmine_dir ⇒ Object
Returns the value of attribute jasmine_dir.
-
#jasmine_files ⇒ Object
writeonly
Sets the attribute jasmine_files.
-
#jasmine_path ⇒ Object
Returns the value of attribute jasmine_path.
-
#port ⇒ Object
TODO: these are largely client concerns, move them.
-
#result_batch_size ⇒ Object
TODO: these are largely client concerns, move them.
-
#spec_dir ⇒ Object
Returns the value of attribute spec_dir.
-
#spec_files ⇒ Object
writeonly
Sets the attribute spec_files.
-
#spec_path ⇒ Object
Returns the value of attribute spec_path.
-
#src_dir ⇒ Object
Returns the value of attribute src_dir.
-
#src_files ⇒ Object
writeonly
Sets the attribute src_files.
-
#src_path ⇒ Object
Returns the value of attribute src_path.
Instance Method Summary collapse
- #add_path_mapper(mapper) ⇒ Object
- #add_rack_app(app, &block) ⇒ Object
- #add_rack_path(path, rack_app_lambda) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #js_files ⇒ Object
- #rack_apps ⇒ Object
- #rack_path_map ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/jasmine/configuration.rb', line 10 def initialize() @rack_paths = {} @apps = [] @path_mappers = [] @jasmine_css_files = lambda { [] } @css_files = lambda { [] } @jasmine_files = lambda { [] } @boot_files = lambda { [] } @src_files = lambda { [] } @spec_files = lambda { [] } end |
Instance Attribute Details
#boot_dir ⇒ Object
Returns the value of attribute boot_dir.
6 7 8 |
# File 'lib/jasmine/configuration.rb', line 6 def boot_dir @boot_dir end |
#boot_files=(value) ⇒ Object (writeonly)
Sets the attribute boot_files
4 5 6 |
# File 'lib/jasmine/configuration.rb', line 4 def boot_files=(value) @boot_files = value end |
#boot_path ⇒ Object
Returns the value of attribute boot_path.
5 6 7 |
# File 'lib/jasmine/configuration.rb', line 5 def boot_path @boot_path end |
#browser ⇒ Object
TODO: these are largely client concerns, move them.
8 9 10 |
# File 'lib/jasmine/configuration.rb', line 8 def browser @browser end |
#css_files ⇒ Object
22 23 24 25 |
# File 'lib/jasmine/configuration.rb', line 22 def css_files map(@jasmine_css_files, :jasmine) + map(@css_files, :src) end |
#host ⇒ Object
TODO: these are largely client concerns, move them.
8 9 10 |
# File 'lib/jasmine/configuration.rb', line 8 def host @host end |
#jasmine_css_files=(value) ⇒ Object (writeonly)
Sets the attribute jasmine_css_files
3 4 5 |
# File 'lib/jasmine/configuration.rb', line 3 def jasmine_css_files=(value) @jasmine_css_files = value end |
#jasmine_dir ⇒ Object
Returns the value of attribute jasmine_dir.
6 7 8 |
# File 'lib/jasmine/configuration.rb', line 6 def jasmine_dir @jasmine_dir end |
#jasmine_files=(value) ⇒ Object (writeonly)
Sets the attribute jasmine_files
4 5 6 |
# File 'lib/jasmine/configuration.rb', line 4 def jasmine_files=(value) @jasmine_files = value end |
#jasmine_path ⇒ Object
Returns the value of attribute jasmine_path.
5 6 7 |
# File 'lib/jasmine/configuration.rb', line 5 def jasmine_path @jasmine_path end |
#port ⇒ Object
TODO: these are largely client concerns, move them.
8 9 10 |
# File 'lib/jasmine/configuration.rb', line 8 def port @port end |
#result_batch_size ⇒ Object
TODO: these are largely client concerns, move them.
8 9 10 |
# File 'lib/jasmine/configuration.rb', line 8 def result_batch_size @result_batch_size end |
#spec_dir ⇒ Object
Returns the value of attribute spec_dir.
6 7 8 |
# File 'lib/jasmine/configuration.rb', line 6 def spec_dir @spec_dir end |
#spec_files=(value) ⇒ Object (writeonly)
Sets the attribute spec_files
4 5 6 |
# File 'lib/jasmine/configuration.rb', line 4 def spec_files=(value) @spec_files = value end |
#spec_path ⇒ Object
Returns the value of attribute spec_path.
5 6 7 |
# File 'lib/jasmine/configuration.rb', line 5 def spec_path @spec_path end |
#src_dir ⇒ Object
Returns the value of attribute src_dir.
6 7 8 |
# File 'lib/jasmine/configuration.rb', line 6 def src_dir @src_dir end |
#src_files=(value) ⇒ Object (writeonly)
Sets the attribute src_files
4 5 6 |
# File 'lib/jasmine/configuration.rb', line 4 def src_files=(value) @src_files = value end |
#src_path ⇒ Object
Returns the value of attribute src_path.
5 6 7 |
# File 'lib/jasmine/configuration.rb', line 5 def src_path @src_path end |
Instance Method Details
#add_path_mapper(mapper) ⇒ Object
50 51 52 |
# File 'lib/jasmine/configuration.rb', line 50 def add_path_mapper(mapper) @path_mappers << mapper.call(self) end |
#add_rack_app(app, &block) ⇒ Object
46 47 48 |
# File 'lib/jasmine/configuration.rb', line 46 def add_rack_app(app, &block) @apps << [app, block] end |
#add_rack_path(path, rack_app_lambda) ⇒ Object
38 39 40 |
# File 'lib/jasmine/configuration.rb', line 38 def add_rack_path(path, rack_app_lambda) @rack_paths[path] = rack_app_lambda end |
#js_files ⇒ Object
27 28 29 30 31 32 |
# File 'lib/jasmine/configuration.rb', line 27 def js_files map(@jasmine_files, :jasmine) + map(@src_files, :src) + map(@spec_files, :spec) + map(@boot_files, :boot) end |
#rack_apps ⇒ Object
42 43 44 |
# File 'lib/jasmine/configuration.rb', line 42 def rack_apps [] + @apps end |
#rack_path_map ⇒ Object
34 35 36 |
# File 'lib/jasmine/configuration.rb', line 34 def rack_path_map {}.merge(@rack_paths) end |