Class: ODDB::View::Admin::Entities::Wrapper

Inherits:
Object
  • Object
show all
Defined in:
src/view/admin/entities.rb

Class Method Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Wrapper) initialize(entity)

A new instance of Wrapper



59
60
61
# File 'src/view/admin/entities.rb', line 59

def initialize(entity)
  @entity = entity
end

Class Method Details

+ (Object) delegators(*args)



43
44
45
46
47
48
49
# File 'src/view/admin/entities.rb', line 43

def Wrapper.delegators(*args)
  args.each { |key|
    define_method(key) { 
      @entity.send(key)
    }
  }
end

+ (Object) preferences(*args)



50
51
52
53
54
55
56
# File 'src/view/admin/entities.rb', line 50

def Wrapper.preferences(*args)
  args.each { |key|
    define_method(key) { 
      @entity.send(:get_preference, key)
    }
  }
end

Instance Method Details

- (Object) affiliations



62
63
64
# File 'src/view/admin/entities.rb', line 62

def affiliations
  @entity.affiliations.collect { |aff| aff.name }
end