class Thinreports::Core::Shape::Basic::Interface

Public Instance Methods

hide() click to toggle source

@see visible @return [self]

# File lib/thinreports/core/shape/basic/interface.rb, line 63
def hide
  visible(false)
  self
end
id() click to toggle source

@return [String]

# File lib/thinreports/core/shape/basic/interface.rb, line 11
def id
  internal.id.dup
end
show() click to toggle source

@see visible @return [self]

# File lib/thinreports/core/shape/basic/interface.rb, line 70
def show
  visible(true)
  self
end
style(*args) click to toggle source

@overload style(style_name)

@param [Symbol] style_name
@return [Object]

@overload style(style_name, value)

@param [Symbol] style_name
@param [String, Symbol, Number, Array] value
@return [self]

@overload style(style_name, value1, value2)

@param [Symbol] style_name
@param [String, Number] value1
@param [String, Number] value2
@return [self]
# File lib/thinreports/core/shape/basic/interface.rb, line 39
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) click to toggle source

@param [Hash] settings style_name: value @return [self]

# File lib/thinreports/core/shape/basic/interface.rb, line 56
def styles(settings)
  settings.each { |args| style(*args) }
  self
end
visible(visibility) click to toggle source

@param [Boolean] visibility @return [self]

# File lib/thinreports/core/shape/basic/interface.rb, line 17
def visible(visibility)
  internal.style.visible = visibility
  self
end
visible?() click to toggle source

@return [Boolean]

# File lib/thinreports/core/shape/basic/interface.rb, line 23
def visible?
  internal.style.visible
end

Private Instance Methods

init_internal(parent, format) click to toggle source

@see Thinreports::Core::Shape::Base::Interface#init_internal

# File lib/thinreports/core/shape/basic/interface.rb, line 78
def init_internal(parent, format)
  Basic::Internal.new(parent, format)
end