This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
write = (buffer, offset, length) -> | |
offset or= 0 | |
length or= buffer.length | |
while machine and offset < length | |
pattern = machine.definition.pattern[machine.index] | |
if pattern.arrayed | |
loop | |
buffer[offset] = machine.value[machine.offset] | |
machine.offset += machine.increment | |
bytesWritten++ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
write = (buffer) -> | |
offset = if arguments.length > 1 then arguments[1] else 0 | |
length = if arguments.length > 2 then arguments[2] else buffer.length | |
while machine isnt null and offset < length | |
pattern = machine.definition.pattern[machine.index] | |
if pattern.arrayed | |
loop | |
buffer[offset] = machine.value[machine.offset] | |
machine.offset += machine.increment | |
bytesWritten++ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ThingsController < ApplicationController | |
# call-seq: | |
# GET http://domain.tld/things | |
# | |
def index | |
@things = Thing.all | |
end | |
# call-seq: | |
# GET http://domain.tld/things/:id |