From 61fa1d89ec05a40e9b94fe00c3b82a55acfba48b Mon Sep 17 00:00:00 2001 From: Braiden Vasco Date: Fri, 21 Jul 2017 17:54:51 +0000 Subject: [PATCH] Move class Widgets::Message to Widgets::Chat::NewMessage --- lib/main.rb | 2 +- lib/widgets/chat.rb | 2 +- lib/widgets/{message.rb => chat/new_message.rb} | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) rename lib/widgets/{message.rb => chat/new_message.rb} (53%) diff --git a/lib/main.rb b/lib/main.rb index eb0916a..f28d458 100644 --- a/lib/main.rb +++ b/lib/main.rb @@ -19,7 +19,7 @@ require 'widgets/search' require 'widgets/list' require 'widgets/chat' -require 'widgets/message' +require 'widgets/chat/new_message' class Main def self.inherited(_base) diff --git a/lib/widgets/chat.rb b/lib/widgets/chat.rb index f2eeaf3..516969b 100644 --- a/lib/widgets/chat.rb +++ b/lib/widgets/chat.rb @@ -13,7 +13,7 @@ module Widgets @width = width @height = height - @message = Widgets::Message.new x, y + height - 1, width, 1 + @message = NewMessage.new x, y + height - 1, width, 1 @focused = false diff --git a/lib/widgets/message.rb b/lib/widgets/chat/new_message.rb similarity index 53% rename from lib/widgets/message.rb rename to lib/widgets/chat/new_message.rb index d31ba1e..022f76f 100644 --- a/lib/widgets/message.rb +++ b/lib/widgets/chat/new_message.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true module Widgets - class Message < Text + class Chat + class NewMessage < Text + end end end