Class: RecordField
- Inherits:
-
Object
- Object
- RecordField
- Defined in:
- lib/fluent/plugin/datahub/datahub-record-schema.rb
Instance Method Summary collapse
- #get_name ⇒ Object
- #get_type ⇒ Object
-
#initialize(name, type) ⇒ RecordField
constructor
A new instance of RecordField.
- #to_json(*a) ⇒ Object
Constructor Details
#initialize(name, type) ⇒ RecordField
Returns a new instance of RecordField.
5 6 7 8 |
# File 'lib/fluent/plugin/datahub/datahub-record-schema.rb', line 5 def initialize(name, type) @name = name @type = type end |
Instance Method Details
#get_name ⇒ Object
10 11 12 |
# File 'lib/fluent/plugin/datahub/datahub-record-schema.rb', line 10 def get_name() return @name end |
#get_type ⇒ Object
14 15 16 |
# File 'lib/fluent/plugin/datahub/datahub-record-schema.rb', line 14 def get_type() return @type end |
#to_json(*a) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/fluent/plugin/datahub/datahub-record-schema.rb', line 18 def to_json(*a) field_map = {} field_map["name"] = @name field_map["type"] = @type return field_map.to_json(*a) end |