Class: WAB::UI::Display

Inherits:
Object
  • Object
show all
Defined in:
lib/wab/ui/display.rb

Overview

Base class for other displays.

Direct Known Subclasses

List, View

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kind, name, template, transitions, display_class) ⇒ Display



14
15
16
17
18
19
20
# File 'lib/wab/ui/display.rb', line 14

def initialize(kind, name, template, transitions, display_class)
  @kind = kind
  @name = name
  @template = template
  @display_class = display_class
  @transitions = transitions
end

Instance Attribute Details

#display_classObject

Returns the value of attribute display_class.



11
12
13
# File 'lib/wab/ui/display.rb', line 11

def display_class
  @display_class
end

#kindObject (readonly)

Returns the value of attribute kind.



9
10
11
# File 'lib/wab/ui/display.rb', line 9

def kind
  @kind
end

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/wab/ui/display.rb', line 8

def name
  @name
end

#templateObject

Returns the value of attribute template.



10
11
12
# File 'lib/wab/ui/display.rb', line 10

def template
  @template
end

#transitionsObject

Returns the value of attribute transitions.



12
13
14
# File 'lib/wab/ui/display.rb', line 12

def transitions
  @transitions
end

Instance Method Details

#specObject



22
23
24
25
26
27
28
29
# File 'lib/wab/ui/display.rb', line 22

def spec
  {
    name: @name,
    kind: @kind,
    display_class: @display_class,
    transitions: @transitions,
  }
end