Class: SearchKit::Messages::Messaging::Message::Prefixed

Inherits:
Object
  • Object
show all
Defined in:
lib/search_kit/messages/messaging.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePrefixed

Returns a new instance of Prefixed.



69
70
71
72
# File 'lib/search_kit/messages/messaging.rb', line 69

def initialize
  env   = SearchKit.config.app_env.to_s.ansi(:magenta)
  @body = "--> [ #{env} ]: "
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



67
68
69
# File 'lib/search_kit/messages/messaging.rb', line 67

def body
  @body
end

Instance Method Details

#join(*messages) ⇒ Object



74
75
76
# File 'lib/search_kit/messages/messaging.rb', line 74

def join(*messages)
  [body, *messages].join(" ")
end