Class: BotFramework::Fact
Overview
Set of key-value pairs. Advantage of this section is that key and value properties will be rendered with default style information with some delimiter between them. So there is no need for developer to specify style information.
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#value ⇒ Object
Returns the value of attribute value.
Class Method Summary collapse
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Fact
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 = {}) ⇒ Fact
Initializes the object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/bot_framework/models/fact.rb', line 18 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.key = attributes[:key] if attributes.key?(:key) self.value = attributes[:value] if attributes.key?(:value) end |
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
4 5 6 |
# File 'lib/bot_framework/models/fact.rb', line 4 def key @key end |
#value ⇒ Object
Returns the value of attribute value.
6 7 8 |
# File 'lib/bot_framework/models/fact.rb', line 6 def value @value end |
Class Method Details
.swagger_types ⇒ Object
Attribute type mapping.
9 10 11 12 13 14 |
# File 'lib/bot_framework/models/fact.rb', line 9 def self.swagger_types { key: :String, value: :String } end |