Class: Ayadn::UserDescriptionObject
Instance Attribute Summary collapse
-
#entities ⇒ Object
readonly
Returns the value of attribute entities.
-
#input ⇒ Object
readonly
Returns the value of attribute input.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(hash) ⇒ UserDescriptionObject
constructor
A new instance of UserDescriptionObject.
Constructor Details
#initialize(hash) ⇒ UserDescriptionObject
Returns a new instance of UserDescriptionObject.
73 74 75 76 77 |
# File 'lib/ayadn/user_object.rb', line 73 def initialize hash @input = hash["description"].nil? ? {} : hash["description"] @text = @input["text"].nil? ? "" : @input["text"] @entities = EntitiesObject.new(@input) end |
Instance Attribute Details
#entities ⇒ Object (readonly)
Returns the value of attribute entities.
71 72 73 |
# File 'lib/ayadn/user_object.rb', line 71 def entities @entities end |
#input ⇒ Object (readonly)
Returns the value of attribute input.
71 72 73 |
# File 'lib/ayadn/user_object.rb', line 71 def input @input end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
71 72 73 |
# File 'lib/ayadn/user_object.rb', line 71 def text @text end |