Class: Droonga::Plugin::Metadata::InputMessage
- Inherits:
-
Object
- Object
- Droonga::Plugin::Metadata::InputMessage
- Defined in:
- lib/droonga/plugin/metadata/input_message.rb
Defined Under Namespace
Classes: BlankMessageType, NotStringMessageType
Instance Method Summary collapse
-
#initialize(plugin_class) ⇒ InputMessage
constructor
A new instance of InputMessage.
- #type ⇒ Object
- #type=(type) ⇒ Object
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
#type ⇒ Object
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 |