Class: CSSShapes::Source::Shape
- Inherits:
-
Object
- Object
- CSSShapes::Source::Shape
- Defined in:
- lib/css_shapes/source.rb
Defined Under Namespace
Classes: Param
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #add_param(name, default) ⇒ Object
-
#initialize(name) ⇒ Shape
constructor
A new instance of Shape.
- #params ⇒ Object
Constructor Details
#initialize(name) ⇒ Shape
Returns a new instance of Shape.
31 32 33 |
# File 'lib/css_shapes/source.rb', line 31 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
30 31 32 |
# File 'lib/css_shapes/source.rb', line 30 def name @name end |
Instance Method Details
#add_param(name, default) ⇒ Object
39 40 41 42 43 |
# File 'lib/css_shapes/source.rb', line 39 def add_param(name, default) Param.new(name, default).tap do |param| params << param end end |
#params ⇒ Object
35 36 37 |
# File 'lib/css_shapes/source.rb', line 35 def params @params ||= [] end |