Class: JsSpec::Resources::Suite

Inherits:
Object
  • Object
show all
Defined in:
lib/js_spec/resources/suite.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#idObject (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