Class: Refinery::Flare::Part

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Validations, HashInitializer
Defined in:
app/models/refinery/flare/part.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HashInitializer

#initialize

Instance Attribute Details

#refinery_optionsObject

Returns the value of attribute refinery_options.



7
8
9
# File 'app/models/refinery/flare/part.rb', line 7

def refinery_options
  @refinery_options
end

#repeatableObject

Returns the value of attribute repeatable.



7
8
9
# File 'app/models/refinery/flare/part.rb', line 7

def repeatable
  @repeatable
end

Instance Method Details

#refinery_options_exist?Boolean

Returns:

  • (Boolean)


13
14
15
16
17
# File 'app/models/refinery/flare/part.rb', line 13

def refinery_options_exist?
  unless refinery_options.keys - Refinery::PagePart.attribute_names.map { |a| a.to_sym } == []
    errors.add(:refinery_options, "Invalid refinery_options for #{self.class}")
  end
end