-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
I'm building a command line client for the Strava API, https://github.com/dblock/strava-ruby-cli.
Ripl comes in handy and I could easily throw in strava console that let me delegate anything from my client and do things like athlete.name.
I also would like to be able to just pass these commands on the command line and let Ripl evaluate them for me, without a prompt. How do I do that?
module Strava
module Cli
class Console < SimpleDelegator
attr_reader :client
def initialize(access_token)
@client = Strava::Api::Client.new(access_token: access_token)
super @client
end
def run(args)
# HOW DO I DO THIS?
end
def start!
Ripl.start(binding: binding, prompt: 'Strava> ')
end
end
end
endI can do this without ripl with just eval here, but it feels wrong.
Metadata
Metadata
Assignees
Labels
No labels