class Rushover::Cli::Rush
This class is accessing helper methods used in the bin file.
Public Instance Methods
add_key(key_symbol, key_value)
click to toggle source
@param key_symbol [Symbol] symbol to add @param key_value [String] value to assign to key_symbol @return [Psych::Store] updated YAML Store @since 0.0.2 @note Currently not used by rushover-cli @todo Add ability to set :user and :rush keys
# File lib/rushover/cli.rb, line 76 def add_key(key_symbol, key_value) store = config store.transaction do store[key_symbol] = key_value end end
client(app_token)
click to toggle source
config()
click to toggle source
@return [Psych::Store] YAML Store consisting of a :user and :rush keys @since 0.0.2
# File lib/rushover/cli.rb, line 54 def config YAML::Store.new(rc_file) end
get_key(key_symbol)
click to toggle source
@!group Key management @param key_symbol [Symbol] symbol to fetch @return [String] value of fetched key @since 0.0.2
# File lib/rushover/cli.rb, line 63 def get_key(key_symbol) store = config store.transaction do store.fetch(key_symbol) end end
notify(user)
click to toggle source
rc_file()
click to toggle source
@!group Configuration management @return [Pathname] location of .rushrc file @since 0.0.2
# File lib/rushover/cli.rb, line 48 def rc_file Pathname.new("#{ENV['HOME']}/.rushrc") end
user(user_key, client)
click to toggle source
version()
click to toggle source
@!group Miscellaneous @return [String] version number of `rushover-cli` as a String @since 0.0.2
# File lib/rushover/cli.rb, line 87 def version Rushover::Cli::VERSION end