Class: Flumtter::Window::UserBase

Inherits:
Buf::Element show all
Defined in:
lib/flumtter/app/core/windows/userbase.rb

Instance Attribute Summary

Attributes inherited from Buf::Element

#object

Instance Method Summary collapse

Methods inherited from Buf::Element

#initialize, #width

Methods included from Util

#command_value_regexp, #dialog_for_index, #error, #error_handler, #id2obj, #if_tweet, #index_regexp, #index_with_dialog, #on_event, #parse_index, #parse_time, #sarastire, #sarastire_user, #screen_name_regexp

Constructor Details

This class inherits a constructor from Flumtter::Window::Buf::Element

Instance Method Details

#elementObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/flumtter/app/core/windows/userbase.rb', line 8

def element
  @text ||= <<~EOF
    #{header}
    #{
      {
        "#{@object.name} (@#{@object.screen_name})": {
          description: @object.description.split_num(Terminal.x - 20),
          location: @object.location,
          url: @object.website.to_s
        }
      }.indent
    }
  EOF
end

#idObject



4
5
6
# File 'lib/flumtter/app/core/windows/userbase.rb', line 4

def id
  @object.id
end