Class: Riddle::Configuration::XMLSource

Inherits:
Source show all
Defined in:
lib/riddle/configuration/xml_source.rb

Instance Attribute Summary

Attributes inherited from Source

#name, #parent, #type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Source

#render

Constructor Details

#initialize(name, type) ⇒ XMLSource

Returns a new instance of XMLSource.



17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/riddle/configuration/xml_source.rb', line 17

def initialize(name, type)
  @name = name
  @type = type
  
  @xmlpipe_field            = []
  @xmlpipe_attr_uint        = []
  @xmlpipe_attr_bool        = []
  @xmlpipe_attr_timestamp   = []
  @xmlpipe_attr_str2ordinal = []
  @xmlpipe_attr_float       = []
  @xmlpipe_attr_multi       = []
end

Class Method Details

.settingsObject



6
7
8
9
10
11
12
13
# File 'lib/riddle/configuration/xml_source.rb', line 6

def self.settings 
  [
    :type, :xmlpipe_command, :xmlpipe_field,
    :xmlpipe_attr_uint, :xmlpipe_attr_bool, :xmlpipe_attr_timestamp,
    :xmlpipe_attr_str2ordinal, :xmlpipe_attr_float, :xmlpipe_attr_multi,
    :xmlpipe_fixup_utf8
  ]
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/riddle/configuration/xml_source.rb', line 30

def valid?
  super && ( !@xmlpipe_command.nil? || !parent.nil? )
end