Class: ThinReports::Core::Shape::Basic::Interface
Instance Attribute Summary
#internal
Instance Method Summary
collapse
#copy, #initialize
Instance Method Details
#hide ⇒ self
62
63
64
65
|
# File 'lib/thinreports/core/shape/basic/interface.rb', line 62
def hide
visible(false)
self
end
|
#id ⇒ String
10
11
12
|
# File 'lib/thinreports/core/shape/basic/interface.rb', line 10
def id
internal.id.dup
end
|
#show ⇒ self
69
70
71
72
|
# File 'lib/thinreports/core/shape/basic/interface.rb', line 69
def show
visible(true)
self
end
|
#style(style_name) ⇒ Object
#style(style_name, value) ⇒ self
#style(style_name, value1, value2) ⇒ self
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# File 'lib/thinreports/core/shape/basic/interface.rb', line 38
def style(*args)
case args.length
when 1
internal.style[args.first]
when 2
internal.style[args.first] = args.last
self
when 3
internal.style[args.shift] = args
self
else
raise ArgumentError, '#style requires 1 or 2, 3 arguments'
end
end
|
#styles(settings) ⇒ self
55
56
57
58
|
# File 'lib/thinreports/core/shape/basic/interface.rb', line 55
def styles(settings)
settings.each{ |args| style(*args) }
self
end
|
#visible(visibility) ⇒ self
16
17
18
19
|
# File 'lib/thinreports/core/shape/basic/interface.rb', line 16
def visible(visibility)
internal.style.visible = visibility
self
end
|
#visible? ⇒ Boolean
22
23
24
|
# File 'lib/thinreports/core/shape/basic/interface.rb', line 22
def visible?
internal.style.visible
end
|