Class: Quilt::Performance::EventMetadata
- Inherits:
-
Object
- Object
- Quilt::Performance::EventMetadata
- Defined in:
- lib/quilt_rails/performance/event_metadata.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#size ⇒ Object
Returns the value of attribute size.
Class Method Summary collapse
Instance Method Summary collapse
- #has_size? ⇒ Boolean
-
#initialize(name:, size:) ⇒ EventMetadata
constructor
A new instance of EventMetadata.
Constructor Details
#initialize(name:, size:) ⇒ EventMetadata
Returns a new instance of EventMetadata.
16 17 18 19 |
# File 'lib/quilt_rails/performance/event_metadata.rb', line 16 def initialize(name:, size:) @name = name @size = size end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/quilt_rails/performance/event_metadata.rb', line 6 def name @name end |
#size ⇒ Object
Returns the value of attribute size.
7 8 9 |
# File 'lib/quilt_rails/performance/event_metadata.rb', line 7 def size @size end |
Class Method Details
.from_params(params) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/quilt_rails/performance/event_metadata.rb', line 9 def self.from_params(params) EventMetadata.new( name: params[:name], size: params[:size], ) end |
Instance Method Details
#has_size? ⇒ Boolean
21 22 23 |
# File 'lib/quilt_rails/performance/event_metadata.rb', line 21 def has_size? !size.nil? end |