Module: Nps
- Extended by:
- Nps
- Included in:
- Nps
- Defined in:
- lib/nps.rb,
lib/nps/ballot.rb,
lib/nps/survey.rb,
lib/nps/version.rb,
lib/nps/calculator.rb,
lib/nps/configuration.rb
Defined Under Namespace
Classes: Ballot, Calculator, Configuration, Survey
Constant Summary collapse
- VERSION =
"0.0.1"
Instance Attribute Summary collapse
-
#configuration ⇒ Object
Returns the value of attribute configuration.
Instance Method Summary collapse
-
#configure {|configuration| ... } ⇒ Object
Public: Set custom configuration options such as how to store the NPS votes.
Instance Attribute Details
#configuration ⇒ Object
Returns the value of attribute configuration.
12 13 14 |
# File 'lib/nps.rb', line 12 def configuration @configuration end |
Instance Method Details
#configure {|configuration| ... } ⇒ Object
Public: Set custom configuration options such as how to store the NPS votes.
Examples:
Nps.configure do |config|
config.ballot_adaptor = YourBallotAdaptor
end
22 23 24 25 |
# File 'lib/nps.rb', line 22 def configure self.configuration ||= Nps::Configuration.new yield(configuration) if block_given? end |