Module: Shokkenki::Consumer::Configuration::Session
- Included in:
- Session
- Defined in:
- lib/shokkenki/consumer/configuration/session.rb
Instance Attribute Summary collapse
-
#stubber_classes ⇒ Object
readonly
Returns the value of attribute stubber_classes.
Instance Method Summary collapse
- #configure(&block) ⇒ Object
- #define_provider(name, &block) ⇒ Object
- #register_stubber(name, clazz) ⇒ Object
- #tickets(location) ⇒ Object
Instance Attribute Details
#stubber_classes ⇒ Object (readonly)
Returns the value of attribute stubber_classes.
9 10 11 |
# File 'lib/shokkenki/consumer/configuration/session.rb', line 9 def stubber_classes @stubber_classes end |
Instance Method Details
#configure(&block) ⇒ Object
11 12 13 |
# File 'lib/shokkenki/consumer/configuration/session.rb', line 11 def configure &block instance_eval &block if block end |
#define_provider(name, &block) ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/shokkenki/consumer/configuration/session.rb', line 27 def define_provider name, &block provider_config = ProviderConfiguration.new( name, stubber_classes ) provider_config.instance_eval &block if block add_provider provider_config.to_provider end |
#register_stubber(name, clazz) ⇒ Object
23 24 25 |
# File 'lib/shokkenki/consumer/configuration/session.rb', line 23 def register_stubber name, clazz stubber_classes[name] = clazz end |
#tickets(location) ⇒ Object
15 16 17 |
# File 'lib/shokkenki/consumer/configuration/session.rb', line 15 def tickets location self.ticket_location = location end |