Module: Twitter::Creatable
- Includes:
- Memoizable
- Included in:
- DirectMessage, DirectMessageEvent, DirectMessages::WelcomeMessage, DirectMessages::WelcomeMessageRule, List, SavedSearch, TrendResults, Tweet, User
- Defined in:
- lib/twitter/creatable.rb
Instance Method Summary collapse
- #created? ⇒ Boolean
-
#created_at ⇒ Time
Time when the object was created on Twitter.
Instance Method Details
#created? ⇒ Boolean
21 22 23 |
# File 'lib/twitter/creatable.rb', line 21 def created? !!@attrs[:created_at] end |
#created_at ⇒ Time
Time when the object was created on Twitter
11 12 13 14 15 16 17 |
# File 'lib/twitter/creatable.rb', line 11 def created_at time = @attrs[:created_at] return if time.nil? time = Time.parse(time) unless time.is_a?(Time) time.utc end |