class PryEmoji::Prompt

Public Class Methods

method_missing(method_id, *arguments, &block) click to toggle source
# File lib/pry-emoji.rb, line 125
def self.method_missing(method_id, *arguments, &block)
  self.new(normalize_type(method_id), *arguments)
end
new(type = :base, configuration = nil) click to toggle source
Calls superclass method
# File lib/pry-emoji.rb, line 121
def initialize(type = :base, configuration = nil)
  super(PryEmoji::Config.new(type, configuration).prompt)
end

Private Class Methods

normalize_type(type) click to toggle source
# File lib/pry-emoji.rb, line 131
def self.normalize_type(type)
  play_type = (types & Array(type.to_s.titleize.to_sym)).first
  puts "I don't know how to play #{type}" unless play_type
  play_type || :base
end