Class: JsSpec::Resources::Suite
- Inherits:
-
Object
- Object
- JsSpec::Resources::Suite
- Defined in:
- lib/js_spec/resources/suite.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id) ⇒ Suite
constructor
A new instance of Suite.
- #locate(name) ⇒ Object
Constructor Details
#initialize(id) ⇒ Suite
Returns a new instance of Suite.
11 12 13 |
# File 'lib/js_spec/resources/suite.rb', line 11 def initialize(id) @id = id end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
10 11 12 |
# File 'lib/js_spec/resources/suite.rb', line 10 def id @id end |
Class Method Details
.locate(id) ⇒ Object
5 6 7 |
# File 'lib/js_spec/resources/suite.rb', line 5 def locate(id) new id end |
Instance Method Details
#locate(name) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/js_spec/resources/suite.rb', line 15 def locate(name) if name == 'finish' SuiteFinish.new self else raise ArgumentError, "Invalid path: #{name}" end end |