Skip to content

Commit 2962aac

Browse files
author
Tim Rogers
committed
Condense documentation on checking whether Spring is running
1 parent 211fb55 commit 2962aac

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

README.md

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -176,23 +176,7 @@ $ bin/spring stop
176176
Spring stopped.
177177
```
178178

179-
From within your code, you can check whether Spring is active by checking whether the
180-
`Spring` constant is defined:
181-
182-
```ruby
183-
# With Spring running
184-
defined?(Spring)
185-
# => "constant"
186-
187-
# With Spring disabled
188-
defined?(Spring)
189-
# => nil
190-
191-
# Since a string is truthy and `nil` is falsy, we can use this as our condition
192-
if defined?(Spring)
193-
# Do something
194-
end
195-
```
179+
From within your code, you can check whether Spring is active with `if defined?(Spring)`.
196180

197181
### Removal
198182

0 commit comments

Comments
 (0)