Module: Tins::ClassMethod

Includes:
Eigenclass
Included in:
Module
Defined in:
lib/tins/dslkit.rb

Instance Method Summary collapse

Methods included from Eigenclass

#eigenclass_eval

Instance Method Details

#class_attr_accessor(*ids) ⇒ Object

Define reader and writer attribute methods for all *ids.



34
35
36
# File 'lib/tins/dslkit.rb', line 34

def class_attr_accessor(*ids)
  eigenclass_eval { attr_accessor(*ids) }
end

#class_attr_reader(*ids) ⇒ Object

Define reader attribute methods for all *ids.



39
40
41
# File 'lib/tins/dslkit.rb', line 39

def class_attr_reader(*ids)
  eigenclass_eval { attr_reader(*ids) }
end

#class_attr_writer(*ids) ⇒ Object

Define writer attribute methods for all *ids.



44
45
46
# File 'lib/tins/dslkit.rb', line 44

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.



29
30
31
# File 'lib/tins/dslkit.rb', line 29

def class_define_method(name, &block)
  eigenclass_eval { define_method(name, &block) }
end