Class: Konami::Fo
- Inherits:
-
PayDirt::Base
- Object
- PayDirt::Base
- Konami::Fo
- Defined in:
- lib/konami/fo.rb
Instance Method Summary collapse
- #execute! ⇒ Object
-
#initialize(options = {}) ⇒ Fo
constructor
A new instance of Fo.
Constructor Details
#initialize(options = {}) ⇒ Fo
Returns a new instance of Fo.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/konami/fo.rb', line 8 def initialize( = {}) = { konamio: Konamio::Sequence::Requisition, konamio_params: { prompt: "Enter the Konami code!", confirmation: false }, foaas: Foaas::FO, foaas_params: { name: "You", from: "Me", } }.merge() () end |
Instance Method Details
#execute! ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/konami/fo.rb', line 25 def execute! @konamio.new(@konamio_params).execute! { @response = @foaas.new(@foaas_params).execute! puts "#{@response.data["message"]} #{@response.data["subtitle"]}" } return result(true, @response) end |