Class: HelloWorldHandler

Inherits:
RubyPitaya::HandlerBase show all
Defined in:
lib/rubypitaya/app-template/app/handlers/hello_world_handler.rb

Instance Attribute Summary

Attributes inherited from RubyPitaya::HandlerBase

#config, #log, #objects, #params, #postman, #services, #session, #setup

Instance Method Summary collapse

Methods inherited from RubyPitaya::HandlerBase

authenticated_action_name?, #initialize, non_authenticated_actions, objects, #set_attributes

Constructor Details

This class inherits a constructor from RubyPitaya::HandlerBase

Instance Method Details

#sayHelloObject



5
6
7
8
9
10
11
12
# File 'lib/rubypitaya/app-template/app/handlers/hello_world_handler.rb', line 5

def sayHello
  response = {
    code: StatusCodes::CODE_OK,
    data: {
      message: 'Hello!'
    }
  }
end

#showMessageObject



14
15
16
17
18
19
20
21
22
23
# File 'lib/rubypitaya/app-template/app/handlers/hello_world_handler.rb', line 14

def showMessage
  message = @params[:message]

  response = {
    code: StatusCodes::CODE_OK,
    data: {
      message: message
    }
  }
end