Class: Pupil::Entities

Inherits:
Scheme
  • Object
show all
Defined in:
lib/pupil/schemes.rb

Instance Method Summary collapse

Methods inherited from Scheme

#initialize, #params

Methods included from Essentials

#get, #guess_parameter, #post, #serialize_parameter

Constructor Details

This class inherits a constructor from Pupil::Scheme

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Pupil::Scheme

Instance Method Details

#hashtagsObject



151
152
153
154
155
156
157
158
159
# File 'lib/pupil/schemes.rb', line 151

def hashtags()
  hashtags = []
  @element["hashtags"].each do |hashtag|
    hashtags << Pupil::Hashtag.new(hashtag)
  end
  return hashtags
rescue
  nil
end

#urlsObject



141
142
143
144
145
146
147
148
149
# File 'lib/pupil/schemes.rb', line 141

def urls()
  urls = []
  @element["urls"].each do |url|
    urls << Pupil::URL.new(url)
  end
  return urls
rescue
  nil
end

#user_mentionsObject



161
162
163
164
165
166
167
168
169
# File 'lib/pupil/schemes.rb', line 161

def user_mentions()
  user_mentions = []
  @element["user_mentions"].each do |user_mention|
    user_mentions << Pupil::UserMention.new(user_mention)
  end
  return user_mentions
rescue
  nil
end