Class: Restfulie::Client::Mikyung::Concatenator

Inherits:
Object
  • Object
show all
Defined in:
lib/restfulie/client/mikyung/concatenator.rb

Overview

Concatenates pure text in order to build messages that are used as patterns. Usage: When there is a machine

Will invoke concatenate ‘machine’ with ‘a’ with ‘is’ with ‘there’

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content, *args) ⇒ Concatenator

Returns a new instance of Concatenator.



12
13
14
# File 'lib/restfulie/client/mikyung/concatenator.rb', line 12

def initialize(content, *args)
  @content = args.inject(content) { |buf, arg| buf << " " << arg.content }
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



11
12
13
# File 'lib/restfulie/client/mikyung/concatenator.rb', line 11

def content
  @content
end