Class: Flumtter::Window::Buf::Element

Inherits:
Object
  • Object
show all
Includes:
Util
Defined in:
lib/flumtter/app/core/windows/buf_window.rb

Direct Known Subclasses

DMBase, ListBase, TweetBase, UserBase

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Util

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

Constructor Details

#initialize(object, index) ⇒ Element

Returns a new instance of Element.



63
64
65
66
# File 'lib/flumtter/app/core/windows/buf_window.rb', line 63

def initialize(object, index)
  @object = object
  @index = index
end

Instance Attribute Details

#objectObject (readonly)

Returns the value of attribute object.



62
63
64
# File 'lib/flumtter/app/core/windows/buf_window.rb', line 62

def object
  @object
end

Instance Method Details

#elementObject



68
69
70
71
72
73
74
75
# File 'lib/flumtter/app/core/windows/buf_window.rb', line 68

def element
  @text ||= "    \#{header}\n    \#{user}\n    \#{body.split_num(width - 1)}\n    \#{footer}\n  EOF\nend\n"

#widthObject



77
78
79
# File 'lib/flumtter/app/core/windows/buf_window.rb', line 77

def width
  Terminal.x-2
end