Class: Utopia::Responder::Handler

Inherits:
Struct
  • Object
show all
Defined in:
lib/utopia/responder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#blockObject

Returns the value of attribute block

Returns:

  • (Object)

    the current value of block



27
28
29
# File 'lib/utopia/responder.rb', line 27

def block
  @block
end

#content_typeObject

Returns the value of attribute content_type

Returns:

  • (Object)

    the current value of content_type



27
28
29
# File 'lib/utopia/responder.rb', line 27

def content_type
  @content_type
end

Instance Method Details

#call(context, request, media_range, *arguments, **options) ⇒ Object



32
33
34
# File 'lib/utopia/responder.rb', line 32

def call(context, request, media_range, *arguments, **options)
	context.instance_exec(media_range, *arguments, **options, &self.block)
end

#split(*arguments) ⇒ Object



28
29
30
# File 'lib/utopia/responder.rb', line 28

def split(*arguments)
	self.content_type.split(*arguments)
end