Class: MSpec::Opal::RackApp

Inherits:
Rack::Builder
  • Object
show all
Defined in:
opal/lib/mspec/opal/rake_task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ RackApp

Returns a new instance of RackApp

Yields:

  • (_self)

Yield Parameters:



226
227
228
229
230
231
232
233
234
235
236
237
# File 'opal/lib/mspec/opal/rake_task.rb', line 226

def initialize
  self.pattern = nil
  self.basedir = DEFAULT_BASEDIR

  yield(self) if block_given?
  super()

  use Rack::ShowExceptions
  use Rack::ShowStatus
  use Index
  run environment
end

Instance Attribute Details

#basedirObject

Returns the value of attribute basedir



224
225
226
# File 'opal/lib/mspec/opal/rake_task.rb', line 224

def basedir
  @basedir
end

#patternObject

Returns the value of attribute pattern



224
225
226
# File 'opal/lib/mspec/opal/rake_task.rb', line 224

def pattern
  @pattern
end

Instance Method Details

#environmentObject



239
240
241
# File 'opal/lib/mspec/opal/rake_task.rb', line 239

def environment
  @environment ||= Environment.new(basedir, pattern)
end