Module: Maromi::Helpers::Sinatra

Defined in:
lib/maromi/helpers/sinatra.rb

Instance Method Summary collapse

Instance Method Details

#consumerProxies::Consumer, ...

Returns the consumer proxy which corresponds to the level of access attached to this request.

Returns:



16
17
18
# File 'lib/maromi/helpers/sinatra.rb', line 16

def consumer
  maromi.consumer
end

#maromiLazyObject

Returns the LazyObject attached to this request.

Returns:



6
7
8
# File 'lib/maromi/helpers/sinatra.rb', line 6

def maromi
  env['maromi.helper']
end

#new_consumer(*args) ⇒ Object



28
29
30
# File 'lib/maromi/helpers/sinatra.rb', line 28

def new_consumer(*args)
  maromi.new_consumer(*args)
end

#oauth_tokenString

Returns the oauth_token attached to this request.

Returns:

  • (String)

    the oauth_token attached to this request



11
12
13
# File 'lib/maromi/helpers/sinatra.rb', line 11

def oauth_token
  params[:oauth_token]
end

#require_oauth_authentication!Object



20
21
22
# File 'lib/maromi/helpers/sinatra.rb', line 20

def require_oauth_authentication!
  maromi.require_oauth_authentication!
end

#temporary_consumerObject



24
25
26
# File 'lib/maromi/helpers/sinatra.rb', line 24

def temporary_consumer
  maromi.request_for_authorization
end