class Rouge::Theme::Style
Experimental RBS support (using type sampling data from the type_fusion project).
# sig/rouge/theme.rbs class Rouge::Theme::Style < Rouge::Theme::Hash def initialize: (Rouge::Themes::Github theme, ?Hash hsh) -> void def render: (String selector, ) -> nil def rendered_rules: () -> (Enumerator | Array[]) end
def initialize(theme, hsh={})
Experimental RBS support (using type sampling data from the type_fusion project).
type Rouge__Theme__Style_initialize_hsh = fg | Symbol | fg | Symbol | bg | Symbol | fg | Symbol | bold | TrueClass | fg | Symbol | italic | TrueClass def initialize: (Rouge::Themes::Github theme, ?Rouge__Theme__Style_initialize_hsh hsh) -> void
This signature was generated using 47 samples from 1 application.
def initialize(theme, hsh={}) super() @theme = theme merge!(hsh) end
def render(selector, &b)
Experimental RBS support (using type sampling data from the type_fusion project).
def render: (String selector, ) -> nil
This signature was generated using 58 samples from 2 applications.
def render(selector, &b) return enum_for(:render, selector).to_a.join("\n") unless b return if empty? yield "#{selector} {" rendered_rules.each do |rule| yield " #{rule};" end yield "}" end
def rendered_rules(&b)
Experimental RBS support (using type sampling data from the type_fusion project).
def rendered_rules: () -> (Enumerator | )
This signature was generated using 110 samples from 2 applications.
def rendered_rules(&b) return enum_for(:rendered_rules) unless b yield "color: #{fg}" if fg yield "background-color: #{bg}" if bg yield "font-weight: bold" if self[:bold] yield "font-style: italic" if self[:italic] yield "text-decoration: underline" if self[:underline] (self[:rules] || []).each(&b) end