Class: Tramway::Site::PersonDecorator

Inherits:
Core::ApplicationDecorator
  • Object
show all
Defined in:
app/decorators/tramway/site/person_decorator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.show_attributesObject



5
6
7
# File 'app/decorators/tramway/site/person_decorator.rb', line 5

def show_attributes
  %i[full_name short_bio bio photo]
end

Instance Method Details

#bioObject



16
17
18
# File 'app/decorators/tramway/site/person_decorator.rb', line 16

def bio
  raw object.bio
end

#full_nameObject



12
13
14
# File 'app/decorators/tramway/site/person_decorator.rb', line 12

def full_name
  object.names.join ' '
end

#photoObject



20
21
22
# File 'app/decorators/tramway/site/person_decorator.rb', line 20

def photo
  image_view object.photo
end