Class: Droonga::Plugin::Metadata::InputMessage

Inherits:
Object
  • Object
show all
Defined in:
lib/droonga/plugin/metadata/input_message.rb

Defined Under Namespace

Classes: BlankMessageType, NotStringMessageType

Instance Method Summary collapse

Constructor Details

#initialize(plugin_class) ⇒ InputMessage

Returns a new instance of InputMessage.



33
34
35
# File 'lib/droonga/plugin/metadata/input_message.rb', line 33

def initialize(plugin_class)
  @plugin_class = plugin_class
end

Instance Method Details

#typeObject



37
38
39
# File 'lib/droonga/plugin/metadata/input_message.rb', line 37

def type
  configuration[:type]
end

#type=(type) ⇒ Object



41
42
43
44
45
# File 'lib/droonga/plugin/metadata/input_message.rb', line 41

def type=(type)
  raise NotStringMessageType.new(type) unless type.is_a?(String)
  raise BlankMessageType.new if type.empty?
  configuration[:type] = type
end