Sha256: e12bfc8c088c4468cfec232e9c1868453a72401e74ef5a093dd8cd8d247489cf
Contents?: true
Size: 505 Bytes
Versions: 1
Compression:
Stored size: 505 Bytes
Contents
module Styleus class ViewComponent < Styleus::Base with_attributes :headline, :partial_path # id is used as anchor id in the anchor menu, # so it has to be a uid. # TODO: make sure the uid-ness :) def id headline.underscore end class << self def components @components ||= [] end def from_hashes(hashes) components.clear hashes.each { |comp_hash| components << new(comp_hash) } components end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
styleus-0.0.4 | app/models/styleus/view_component.rb |