Class: BotFramework::Entity
- Defined in:
- lib/bot_framework/models/entity.rb
Overview
Object of schema.org types
Instance Attribute Summary collapse
-
#type ⇒ Object
Entity Type (typically from schema.org types).
Class Method Summary collapse
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Entity
constructor
Initializes the object.
Methods inherited from Base
#==, #_deserialize, #_to_hash, #as_json, attr_accessor, attribute_map, #attributes, #attributes_hash, #build_from_hash, #compact_attributes_hash, #eql?, #hash, #list_invalid_properties, #to_body, #to_hash, #to_json, #to_s, #valid?
Constructor Details
#initialize(attributes = {}) ⇒ Entity
Initializes the object
17 18 19 20 21 22 23 24 |
# File 'lib/bot_framework/models/entity.rb', line 17 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.type = attributes[:type] if attributes.key?(:type) end |
Instance Attribute Details
#type ⇒ Object
Entity Type (typically from schema.org types)
6 7 8 |
# File 'lib/bot_framework/models/entity.rb', line 6 def type @type end |
Class Method Details
.swagger_types ⇒ Object
Attribute type mapping.
9 10 11 12 13 |
# File 'lib/bot_framework/models/entity.rb', line 9 def self.swagger_types { type: :String } end |