Module: Tins::ClassMethod
Instance Method Summary collapse
-
#class_attr_accessor(*ids) ⇒ Object
Define reader and writer attribute methods for all *ids.
-
#class_attr_reader(*ids) ⇒ Object
Define reader attribute methods for all *ids.
-
#class_attr_writer(*ids) ⇒ Object
Define writer attribute methods for all *ids.
-
#class_define_method(name, &block) ⇒ Object
Define a class method named name using block.
Methods included from Eigenclass
Instance Method Details
#class_attr_accessor(*ids) ⇒ Object
Define reader and writer attribute methods for all *ids.
35 36 37 |
# File 'lib/tins/dslkit.rb', line 35 def class_attr_accessor(*ids) eigenclass_eval { attr_accessor(*ids) } end |
#class_attr_reader(*ids) ⇒ Object
Define reader attribute methods for all *ids.
40 41 42 |
# File 'lib/tins/dslkit.rb', line 40 def class_attr_reader(*ids) eigenclass_eval { attr_reader(*ids) } end |
#class_attr_writer(*ids) ⇒ Object
Define writer attribute methods for all *ids.
45 46 47 |
# File 'lib/tins/dslkit.rb', line 45 def class_attr_writer(*ids) eigenclass_eval { attr_writer(*ids) } end |
#class_define_method(name, &block) ⇒ Object
Define a class method named name using block.
30 31 32 |
# File 'lib/tins/dslkit.rb', line 30 def class_define_method(name, &block) eigenclass_eval { define_method(name, &block) } end |