Sha256: 3e24fda418cda9f17e6edb297c2cea18d3cf402e2477c8a3e49c8b833ad135d1

Contents?: true

Size: 405 Bytes

Versions: 2

Compression:

Stored size: 405 Bytes

Contents

module Flms
  class ParagraphLayer < Layer
    attr_accessible :header, :body, :color

    validates :header, presence: true
    validates :body, presence: true
    validate :color, :must_be_css_hex_value

    def view_object
      @view_object ||= Flms::ParagraphLayerViewObject.new(self)
    end

  protected

    def set_defaults
      self.width ||= 0.20
      self.color ||= 'fff'
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
flms-0.9.0 app/models/flms/paragraph_layer.rb
flms-0.1.0 app/models/flms/paragraph_layer.rb