Class: RGallery::PhotoConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/rails-gallery/rgallery/photo_config.rb

Direct Known Subclasses

Page, Pages, Photos

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ PhotoConfig

Returns a new instance of PhotoConfig.



6
7
8
9
10
# File 'lib/rails-gallery/rgallery/photo_config.rb', line 6

def initialize options = {}    
  options ||= {}
  @options = options
  @photo_class = options[:photo_class] if options[:photo_class]
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



4
5
6
# File 'lib/rails-gallery/rgallery/photo_config.rb', line 4

def options
  @options
end

#photo_class=(value) ⇒ Object

Sets the attribute photo_class

Parameters:

  • value

    the value to set the attribute photo_class to.



3
4
5
# File 'lib/rails-gallery/rgallery/photo_config.rb', line 3

def photo_class=(value)
  @photo_class = value
end