Sha256: f2534970f9463440c6d5a5e6eb69ef5507519cc9726c65fe726ad5291499ccaf

Contents?: true

Size: 518 Bytes

Versions: 2

Compression:

Stored size: 518 Bytes

Contents

class Module
  # Module extension to return attribute methods. These are all methods
  # that start with `attr_`. This method can be overriden in special cases
  # to work with attribute annotations.
  def attribute_methods
    list = []
    public_methods(true).each do |m|
      list << m if m.to_s =~ /^attr_/
    end
    protected_methods(true).each do |m|
      list << m if m.to_s =~ /^attr_/
    end
    private_methods(true).each do |m|
      list << m if m.to_s =~ /^attr_/
    end
    return list
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
anise-0.6.0 lib/anise/module.rb
anise-0.5.0 lib/anise/module.rb