Class: Twitter::DirectMessages::WelcomeMessageRuleWrapper

Inherits:
Identity
  • Object
show all
Defined in:
lib/twitter/direct_messages/welcome_message_rule_wrapper.rb

Overview

Wraps a Twitter welcome message rule response

Instance Attribute Summary collapse

Attributes inherited from Identity

#id

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

#[], attr_reader, define_attribute_method, define_predicate_method, define_uri_method, display_uri_attr_reader, object_attr_reader, predicate_attr_reader, uri_attr_reader

Methods included from Utils

flat_pmap, pmap

Constructor Details

#initialize(attrs) ⇒ Twitter::DirectMessages::WelcomeMessageRuleWrapper

Initializes a new WelcomeMessageRuleWrapper

Parameters:

  • attrs (Hash)

    The attributes hash from the API response



25
26
27
28
29
30
# File 'lib/twitter/direct_messages/welcome_message_rule_wrapper.rb', line 25

def initialize(attrs)
  attrs = read_from_response(attrs)

  attrs[:welcome_message_rule] = build_welcome_message_rule(attrs)
  super
end

Instance Attribute Details

#created_timestampString (readonly)

The timestamp when the rule was created

Examples:

wrapper.created_timestamp

Returns:

  • (String)


14
15
16
# File 'lib/twitter/direct_messages/welcome_message_rule_wrapper.rb', line 14

def created_timestamp
  @created_timestamp
end