Class: Hospodar::Builder::BuilderParams
- Inherits:
-
Struct
- Object
- Struct
- Hospodar::Builder::BuilderParams
- Defined in:
- lib/hospodar/builder/assembler.rb
Instance Attribute Summary collapse
-
#group ⇒ Object
Returns the value of attribute group.
-
#object ⇒ Object
Returns the value of attribute object.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
Instance Attribute Details
#group ⇒ Object
Returns the value of attribute group
13 14 15 |
# File 'lib/hospodar/builder/assembler.rb', line 13 def group @group end |
#object ⇒ Object
Returns the value of attribute object
13 14 15 |
# File 'lib/hospodar/builder/assembler.rb', line 13 def object @object end |
#title ⇒ Object
Returns the value of attribute title
13 14 15 |
# File 'lib/hospodar/builder/assembler.rb', line 13 def title @title end |
Instance Method Details
#check! ⇒ Object
18 19 20 21 22 |
# File 'lib/hospodar/builder/assembler.rb', line 18 def check! return unless invalid? raise(ArgumentError, 'Please provide object: and title: arguments') end |
#invalid? ⇒ Boolean
24 25 26 |
# File 'lib/hospodar/builder/assembler.rb', line 24 def invalid? (group.nil? && title.nil?) ^ object.nil? end |
#to_a ⇒ Object
14 15 16 |
# File 'lib/hospodar/builder/assembler.rb', line 14 def to_a [group, title, proc { object }] end |