Class: Argyle::StyleSheet::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/argyle/style_sheet/base.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.color_prototypesObject (readonly)

Returns the value of attribute color_prototypes.



9
10
11
# File 'lib/argyle/style_sheet/base.rb', line 9

def color_prototypes
  @color_prototypes
end

.style_prototypesObject (readonly)

Returns the value of attribute style_prototypes.



9
10
11
# File 'lib/argyle/style_sheet/base.rb', line 9

def style_prototypes
  @style_prototypes
end

Class Method Details

.color(id, r:, g:, b:) ⇒ Object



11
12
13
# File 'lib/argyle/style_sheet/base.rb', line 11

def color(id, r:, g:, b:)
  color_prototypes[id] = Argyle::Prototype.new(Argyle::StyleSheet::Color, {r: r, g: g, b: b})
end

.style(id, **opts) ⇒ Object

Parameters:

  • id (Symbol)
  • opts (Hash)

    a customizable set of options

Options Hash (**opts):

  • :fg (Symbol)

    Foreground color

  • :bg (Symbol)

    Background color



20
21
22
# File 'lib/argyle/style_sheet/base.rb', line 20

def style(id, **opts)
  style_prototypes[id] = Argyle::Prototype.new(Argyle::StyleSheet::Style, opts)
end