Sha256: 4171401c6d1a120591d5d6927f160351a412b8b5e6728aa052f75ed3a7ddcec9
Contents?: true
Size: 976 Bytes
Versions: 3
Compression:
Stored size: 976 Bytes
Contents
# frozen_string_literal: true module Kitchen # A centralized place to put common CSS selectors so they aren't sprinkled # throughout the baseline (and so that they can be changed easily if needed) # module Selectors # Base class for different selector configurations # class Base # Selector for the title in a page # @return [String] attr_accessor :title_in_page # Selector for the title in an introduction page # @return [String] attr_accessor :title_in_introduction_page # Selector for the summary in a page # @return [String] attr_accessor :page_summary # Override specific selectors # # @param hash [Hash] a hash of selectors to selector values, e.g. {title_in_page: '.title'} # @return [Base] this object # def override(hash={}) hash.each do |selector, value| send("#{selector}=", value) end self end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
openstax_kitchen-3.2.0 | lib/kitchen/selectors/base.rb |
openstax_kitchen-3.1.0 | lib/kitchen/selectors/base.rb |
openstax_kitchen-3.0.0 | lib/kitchen/selectors/base.rb |