Skip to content
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.

Commit

Permalink
syntax cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kevwil committed Feb 8, 2011
1 parent e07abfd commit c6fcb33
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions javalib/src/main/java/com/github/kevwil/aspen/RackInput.java
Expand Up @@ -11,13 +11,14 @@
* Specification for Rack input, translated to a Java interface.
* @author nicksieger
*/
public interface RackInput {
public interface RackInput
{
/**
* gets must be called without arguments and return a string, or nil on EOF.
* @param context it's a JRuby thing
* @return a string, or nil on EOF
*/
IRubyObject gets(ThreadContext context);
IRubyObject gets( ThreadContext context );

/**
* read behaves like IO#read. Its signature is read([length, [buffer]]). If given,
Expand All @@ -32,15 +33,15 @@ public interface RackInput {
* @param args [length, [buffer]]
* @return nil if length is given and not nil, or "" if length is not given or nil
*/
IRubyObject read(ThreadContext context, IRubyObject[] args);
IRubyObject read( ThreadContext context, IRubyObject[] args );

/**
* each must be called without arguments and only yield Strings.
* @param context it's a JRuby thing
* @param block that receives yield of Strings
* @return pretty much nil
*/
public IRubyObject each(ThreadContext context, Block block);
public IRubyObject each( ThreadContext context, Block block );

/**
* rewind must be called without arguments. It rewinds the input stream back
Expand All @@ -50,7 +51,7 @@ public interface RackInput {
* @param context it's a JRuby thing
* @return pretty much nil
*/
public IRubyObject rewind(ThreadContext context);
public IRubyObject rewind( ThreadContext context );

/**
* Close the input. Exposed only to the Java side because the Rack spec says
Expand Down

0 comments on commit c6fcb33

Please sign in to comment.