Class: EightBall::Providers::Static

Inherits:
Object
  • Object
show all
Defined in:
lib/eight_ball/providers/static.rb

Overview

A Static provider will always provide the exact list of Features that were passed in at construction time.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(features = []) ⇒ Static

Creates a new instance of a Static Provider.

Examples:

provider = EightBall::Providers::Static.new([
  EightBall::Feature.new 'feature1',
  EightBall::Feature.new 'feature2'
])

Parameters:



19
20
21
# File 'lib/eight_ball/providers/static.rb', line 19

def initialize(features = [])
  @features = Array features
end

Instance Attribute Details

#featuresObject (readonly)

Returns the value of attribute features.



7
8
9
# File 'lib/eight_ball/providers/static.rb', line 7

def features
  @features
end