Class: Twitter2Mastodon::Status
- Inherits:
-
Object
- Object
- Twitter2Mastodon::Status
- Defined in:
- lib/twitter2mastodon/status.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(twitt_object) ⇒ Status
constructor
A new instance of Status.
- #status ⇒ Object
Constructor Details
#initialize(twitt_object) ⇒ Status
Returns a new instance of Status.
5 6 7 8 9 10 |
# File 'lib/twitter2mastodon/status.rb', line 5 def initialize(twitt_object) @id = twitt_object.id @name = twitt_object.user.name @message = twitt_object.full_text @url = twitt_object.url end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/twitter2mastodon/status.rb', line 3 def id @id end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
3 4 5 |
# File 'lib/twitter2mastodon/status.rb', line 3 def @message end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/twitter2mastodon/status.rb', line 3 def name @name end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/twitter2mastodon/status.rb', line 3 def url @url end |
Instance Method Details
#status ⇒ Object
12 13 14 |
# File 'lib/twitter2mastodon/status.rb', line 12 def status "#{name}\n\n#{}\n\nOriginal tweet:#{url}" end |