Module: GithubChart

Defined in:
lib/githubchart.rb,
lib/githubchart/svg.rb,
lib/githubchart/version.rb

Overview

Define the version

Defined Under Namespace

Classes: Chart

Constant Summary collapse

COLOR_SCHEMES =

Color schemes for gradient

{
  default: ['#eeeeee', '#d6e685', '#8cc665', '#44a340', '#1e6823'],
  halloween: ['#EEEEEE', '#FFEE4A', '#FFC501', '#FE9600', '#03001C']
}
VERSION =
'0.1.1'

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(*args) ⇒ Object

Helper to create new charts


11
12
13
# File 'lib/githubchart.rb', line 11

def new(*args)
  self::Chart.new(*args)
end

.supportedObject

Helper to list supported types


18
19
20
# File 'lib/githubchart.rb', line 18

def supported
  @supported ||= []
end

.supports?(type) ⇒ Boolean

Helper to check for type support

Returns:

  • (Boolean)

25
26
27
# File 'lib/githubchart.rb', line 25

def supports?(type)
  supported.include? type.to_sym
end

Instance Method Details

#svgObject

Declare SVG support


9
# File 'lib/githubchart/svg.rb', line 9

add_support(:svg)