Sha256: 7bc12792314c96d1ecbaf2a2f422aedb40fbeab280d9e0fd768cd583d20a164a

Contents?: true

Size: 478 Bytes

Versions: 1

Compression:

Stored size: 478 Bytes

Contents

module Paloma
  class Controller

    attr_accessor :resource, :action, :params



    def initialize
      clear_request
    end


    def clear_request
      self.resource = nil
      self.action = nil
      self.params = {}

      true
    end


    def request
      { resource: resource, action: action, params: params }
    end


    def has_request?
      resource.present? && action.present?
    end


    def has_no_request?
      !self.has_request?
    end


  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
paloma-6.0.0 lib/paloma/controller.rb