Class: InfoBase

Inherits:
Object show all
Defined in:
lib/mrpin/core/base/info_base.rb

Direct Known Subclasses

BundleInfoBase

Class Method Summary collapse

Class Method Details

.attributesObject



3
4
5
6
7
8
9
10
11
# File 'lib/mrpin/core/base/info_base.rb', line 3

def self.attributes
  if @attributes.nil?
    @attributes = self.instance_methods.select { |method| method =~ /=$/ }
    @attributes -= self.ignored_methods
    @attributes.map! { |attribute| attribute.to_s.chop.to_sym } # delete last symbol '='
  end

  @attributes
end

.ignored_methodsObject



13
14
15
# File 'lib/mrpin/core/base/info_base.rb', line 13

def self.ignored_methods
  [:===, :==, :!=]
end