Class: Adrift::Pattern::Tags::Style

Inherits:
Object
  • Object
show all
Defined in:
lib/adrift/pattern.rb

Overview

Pattern’s tag that allows to generally express the selected style.

Instance Method Summary collapse

Instance Method Details

#labelObject

Portion of Pattern#string that will be replaced.



46
47
48
# File 'lib/adrift/pattern.rb', line 46

def label
  ':style'
end

#specialize(options = {}) ⇒ Object

Selected style, expects options to include it (:style key).



52
53
54
# File 'lib/adrift/pattern.rb', line 52

def specialize(options={})
  options[:style].to_s
end