Skip to content

Commit 3fcf3f4

Browse files
committed
Using private instead of protected. Fixing an example/rainsocket.ru
1 parent 4d2a6d8 commit 3fcf3f4

File tree

6 files changed

+8
-12
lines changed

6 files changed

+8
-12
lines changed

examples/rainsocket.ru

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ class WelcomeController < Cramp::Websocket
2424
end
2525
end
2626

27-
# rainbows -E deployment -c rainbows.conf hello_world.ru
27+
# rainbows -E deployment -c rainbows.conf rainsocket.ru
2828
run WelcomeController

lib/cramp/abstract.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def process
2626
throw :async
2727
end
2828

29-
protected
29+
private
3030

3131
def continue
3232
init_async_body
@@ -94,8 +94,6 @@ def route_params
9494
@env['router.params'] || {}
9595
end
9696

97-
private
98-
9997
def is_finishable?
10098
!finished? && @body && !@body.closed?
10199
end

lib/cramp/action.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class Action < Abstract
55

66
def initialize(env)
77
super
8-
8+
99
case
1010
when Faye::EventSource.eventsource?(env)
1111
# request has Accept: text/event-stream
@@ -24,7 +24,7 @@ def initialize(env)
2424
end
2525
end
2626

27-
protected
27+
private
2828

2929
def render(body, *args)
3030
send(:"render_#{transport}", body, *args)
@@ -119,8 +119,6 @@ def encode(string, encoding = 'UTF-8')
119119
string.respond_to?(:force_encoding) ? string.force_encoding(encoding) : string
120120
end
121121

122-
protected
123-
124122
def finish
125123
case transport
126124
when :chunked

lib/cramp/callbacks.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def callback_wrapper
6262
end
6363
end
6464

65-
protected
65+
private
6666

6767
def _receive_protocol10_data(data)
6868
protocol10_parser.data << data

lib/cramp/generators/application.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def create_models
6666
end
6767
end
6868

69-
protected
69+
private
7070

7171
def active_record?
7272
options[:with_active_record]
@@ -94,4 +94,4 @@ def valid_const?
9494
end
9595

9696
end
97-
end
97+
end

lib/cramp/periodic_timer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def initialize(*)
1919
@timers = []
2020
end
2121

22-
protected
22+
private
2323

2424
def continue
2525
super

0 commit comments

Comments
 (0)