class HighLine::Style
def initialize(defn = {})
-
defn
(Hash
) -- options for the Style to be created.
def initialize(defn = {}) @definition = defn @name = defn[:name] @code = defn[:code] @rgb = defn[:rgb] @list = defn[:list] @builtin = defn[:builtin] if @rgb hex = self.class.rgb_hex(@rgb) @name ||= "rgb_" + hex elsif @list @name ||= @list end self.class.index self unless defn[:no_index] end