Module: Shy
- Defined in:
- lib/shy.rb,
lib/shy/dsl.rb
Defined Under Namespace
Modules: DSL
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
4 5 6 |
# File 'lib/shy.rb', line 4 def self.included(klass) klass.extend(DSL) end |
.new(*attribute_names) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/shy.rb', line 8 def self.new(*attribute_names) warn 'Shy.new is deprecated, please use the Shy::DSL style instead.' Class.new do include Shy shy *attribute_names end end |
Instance Method Details
#initialize(attributes = {}) ⇒ Object
16 17 18 19 20 |
# File 'lib/shy.rb', line 16 def initialize(attributes={}) attributes.each do |name, value| send("#{name}=", value) end end |