Class: RecastAI::Entity
- Inherits:
-
Object
- Object
- RecastAI::Entity
- Defined in:
- lib/recastai/apis/request/models/entity.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, data) ⇒ Entity
constructor
A new instance of Entity.
Constructor Details
#initialize(name, data) ⇒ Entity
7 8 9 10 11 12 13 14 |
# File 'lib/recastai/apis/request/models/entity.rb', line 7 def initialize(name, data) @name = name data.each_pair do |k, v| self.instance_variable_set("@#{k}", v) self.define_singleton_method(k.to_sym){ v } end end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/recastai/apis/request/models/entity.rb', line 5 def name @name end |