Class: YouPlot::Parameters

Inherits:
Struct
  • Object
show all
Defined in:
lib/youplot/parameters.rb

Overview

UnicodePlot parameters. Why Struct, not Hash?

  • The keys are static in Struct.
  • Struct does not conflict with keyword arguments. Hash dose.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#border ⇒ Object

Returns the value of attribute border

Returns:

  • (Object) —

    the current value of border



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def border
  @border
end

#canvas ⇒ Object

Returns the value of attribute canvas

Returns:

  • (Object) —

    the current value of canvas



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def canvas
  @canvas
end

#closed ⇒ Object

Returns the value of attribute closed

Returns:

  • (Object) —

    the current value of closed



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def closed
  @closed
end

#color ⇒ Object

Returns the value of attribute color

Returns:

  • (Object) —

    the current value of color



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def color
  @color
end

#grid ⇒ Object

Returns the value of attribute grid

Returns:

  • (Object) —

    the current value of grid



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def grid
  @grid
end

#height ⇒ Object

Returns the value of attribute height

Returns:

  • (Object) —

    the current value of height



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def height
  @height
end

#labels ⇒ Object

Returns the value of attribute labels

Returns:

  • (Object) —

    the current value of labels



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def labels
  @labels
end

#margin ⇒ Object

Returns the value of attribute margin

Returns:

  • (Object) —

    the current value of margin



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def margin
  @margin
end

#name ⇒ Object

Returns the value of attribute name

Returns:

  • (Object) —

    the current value of name



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def name
  @name
end

#nbins ⇒ Object

Returns the value of attribute nbins

Returns:

  • (Object) —

    the current value of nbins



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def nbins
  @nbins
end

#padding ⇒ Object

Returns the value of attribute padding

Returns:

  • (Object) —

    the current value of padding



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def padding
  @padding
end

#symbol ⇒ Object

Returns the value of attribute symbol

Returns:

  • (Object) —

    the current value of symbol



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def symbol
  @symbol
end

#title ⇒ Object

Returns the value of attribute title

Returns:

  • (Object) —

    the current value of title



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def title
  @title
end

#width ⇒ Object

Returns the value of attribute width

Returns:

  • (Object) —

    the current value of width



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def width
  @width
end

#xlabel ⇒ Object

Returns the value of attribute xlabel

Returns:

  • (Object) —

    the current value of xlabel



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def xlabel
  @xlabel
end

#xlim ⇒ Object

Returns the value of attribute xlim

Returns:

  • (Object) —

    the current value of xlim



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def xlim
  @xlim
end

#xscale ⇒ Object

Returns the value of attribute xscale

Returns:

  • (Object) —

    the current value of xscale



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def xscale
  @xscale
end

#ylabel ⇒ Object

Returns the value of attribute ylabel

Returns:

  • (Object) —

    the current value of ylabel



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def ylabel
  @ylabel
end

#ylim ⇒ Object

Returns the value of attribute ylim

Returns:

  • (Object) —

    the current value of ylim



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def ylim
  @ylim
end

Instance Method Details

#to_hc ⇒ Object



30
31
32
# File 'lib/youplot/parameters.rb', line 30

def to_hc
  to_h.compact
end