Turn module React::Curses into class
This commit is contained in:
parent
ca855f4ceb
commit
5b4ed276b2
9 changed files with 9 additions and 9 deletions
|
@ -3,6 +3,6 @@
|
|||
require 'react/curses/nodes'
|
||||
|
||||
module React
|
||||
module Curses
|
||||
class Curses
|
||||
end
|
||||
end
|
||||
|
|
|
@ -11,7 +11,7 @@ require 'react/curses/nodes/lines'
|
|||
require 'react/curses/nodes/window'
|
||||
|
||||
module React
|
||||
module Curses
|
||||
class Curses
|
||||
module Nodes
|
||||
def self.klass_for(element)
|
||||
raise TypeError, "expected element to be an #{Element}" unless element.is_a? Element
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module React
|
||||
module Curses
|
||||
class Curses
|
||||
module Nodes
|
||||
class Base
|
||||
attr_reader :parent, :element
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module React
|
||||
module Curses
|
||||
class Curses
|
||||
module Nodes
|
||||
class Component < Base
|
||||
def instance
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module React
|
||||
module Curses
|
||||
class Curses
|
||||
module Nodes
|
||||
class Line < Wrapper
|
||||
def draw
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module React
|
||||
module Curses
|
||||
class Curses
|
||||
module Nodes
|
||||
class Lines < Wrapper
|
||||
def children
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
module React
|
||||
using Helpers
|
||||
|
||||
module Curses
|
||||
class Curses
|
||||
module Nodes
|
||||
class Text < Base
|
||||
def draw
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module React
|
||||
module Curses
|
||||
class Curses
|
||||
module Nodes
|
||||
class Window < Wrapper
|
||||
def window
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module React
|
||||
module Curses
|
||||
class Curses
|
||||
module Nodes
|
||||
class Wrapper < Base
|
||||
def draw
|
||||
|
|
Reference in a new issue