Skip to content

Commit 811c56a

Browse files
authored
Merge pull request modelcontextprotocol#339 from koic/remove_useless_condition_in_examples
Remove useless condition in example
2 parents d186988 + 704d362 commit 811c56a

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

examples/http_client.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,7 @@ def close_session
137137
end
138138
end
139139

140-
# Main script
141-
if __FILE__ == $PROGRAM_NAME
140+
def main
142141
puts <<~MESSAGE
143142
MCP HTTP Client Example
144143
Make sure the HTTP server is running (ruby examples/http_server.rb)
@@ -182,3 +181,5 @@ def close_session
182181
client.close_session
183182
end
184183
end
184+
185+
main

examples/streamable_http_client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,4 +176,4 @@ def main
176176
end
177177
end
178178

179-
main if __FILE__ == $PROGRAM_NAME
179+
main

0 commit comments

Comments
 (0)