Class: LabwareCreators::CreatorButton
- Inherits:
-
Object
- Object
- LabwareCreators::CreatorButton
- Includes:
- ActiveModel::Model
- Defined in:
- app/models/labware_creators.rb
Overview
Used to render the create plate/tube buttons
Direct Known Subclasses
Instance Attribute Summary collapse
-
#creator ⇒ Object
Returns the value of attribute creator.
-
#filters ⇒ Object
Returns the value of attribute filters.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#parent_uuid ⇒ Object
Returns the value of attribute parent_uuid.
-
#purpose_uuid ⇒ Object
Returns the value of attribute purpose_uuid.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #custom_form? ⇒ Boolean
-
#model_name ⇒ Object
limber_plate_children (Plate -> Plate) (plate_creation#create) limber_plate_tubes (Plate -> Tube) (tube_creation#create) limber_tube_children (Tube -> Plate) (nothing - want to be plate_creation#create) limber_tube_tubes (Tube -> Tube) (tube_creation#create).
Instance Attribute Details
#creator ⇒ Object
Returns the value of attribute creator.
32 33 34 |
# File 'app/models/labware_creators.rb', line 32 def creator @creator end |
#filters ⇒ Object
Returns the value of attribute filters.
32 33 34 |
# File 'app/models/labware_creators.rb', line 32 def filters @filters end |
#name ⇒ Object
Returns the value of attribute name.
32 33 34 |
# File 'app/models/labware_creators.rb', line 32 def name @name end |
#parent ⇒ Object
Returns the value of attribute parent.
32 33 34 |
# File 'app/models/labware_creators.rb', line 32 def parent @parent end |
#parent_uuid ⇒ Object
Returns the value of attribute parent_uuid.
32 33 34 |
# File 'app/models/labware_creators.rb', line 32 def parent_uuid @parent_uuid end |
#purpose_uuid ⇒ Object
Returns the value of attribute purpose_uuid.
32 33 34 |
# File 'app/models/labware_creators.rb', line 32 def purpose_uuid @purpose_uuid end |
#type ⇒ Object
Returns the value of attribute type.
32 33 34 |
# File 'app/models/labware_creators.rb', line 32 def type @type end |
Instance Method Details
#custom_form? ⇒ Boolean
36 37 38 |
# File 'app/models/labware_creators.rb', line 36 def custom_form? false end |
#model_name ⇒ Object
limber_plate_children (Plate -> Plate) (plate_creation#create) limber_plate_tubes (Plate -> Tube) (tube_creation#create) limber_tube_children (Tube -> Plate) (nothing - want to be plate_creation#create) limber_tube_tubes (Tube -> Tube) (tube_creation#create)
44 45 46 47 48 49 50 51 52 53 54 |
# File 'app/models/labware_creators.rb', line 44 def model_name case type # TODO: can we rename 'child' to 'plate' please? see routes.rb when 'plate' ::ActiveModel::Name.new(Limber::Plate, nil, 'child') when 'tube' ::ActiveModel::Name.new(Limber::Tube, nil, 'tube') else raise StandardError, "Unknown type #{type}" end end |