Class: Docks::Containers::Variation

Inherits:
Symbol show all
Defined in:
lib/docks/containers/variation_container.rb

Direct Known Subclasses

State, Variant

Instance Attribute Summary

Attributes inherited from Symbol

#belongs_to, #methods, #properties

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Symbol

#add_member, #add_members, #find, from_symbol, #has_members?, #member?, #members, #private?, #public?, #summary, #symbol_id, #to_descriptor

Methods inherited from Base

#==, #[], #[]=, #delete, #fetch, #find, #method_missing, #respond_to?, #summarized?, #summary, #tags, #to_h, #update

Constructor Details

#initialize(variation_hash = {}) ⇒ Variation

Returns a new instance of Variation.



8
9
10
11
# File 'lib/docks/containers/variation_container.rb', line 8

def initialize(variation_hash = {})
  super
  set_defaults
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Docks::Containers::Base

Class Method Details

.typeObject



6
# File 'lib/docks/containers/variation_container.rb', line 6

def self.type; "variation" end

Instance Method Details

#has_demo?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/docks/containers/variation_container.rb', line 13

def has_demo?
  [Types::Demo::OWN, Types::Demo::JOINT].include?(demo_type)
end