Class: Rjax::Config
- Inherits:
-
Object
- Object
- Rjax::Config
- Defined in:
- lib/rjax/config.rb
Instance Attribute Summary collapse
-
#prefix ⇒ Object
Returns the value of attribute prefix.
-
#suffix ⇒ Object
Returns the value of attribute suffix.
Instance Method Summary collapse
Instance Attribute Details
#prefix ⇒ Object
Returns the value of attribute prefix.
2 3 4 |
# File 'lib/rjax/config.rb', line 2 def prefix @prefix end |
#suffix ⇒ Object
Returns the value of attribute suffix.
2 3 4 |
# File 'lib/rjax/config.rb', line 2 def suffix @suffix end |
Instance Method Details
#prefix? ⇒ Boolean
13 14 15 |
# File 'lib/rjax/config.rb', line 13 def prefix? prefix && !prefix.empty? end |
#suffix? ⇒ Boolean
9 10 11 |
# File 'lib/rjax/config.rb', line 9 def suffix? suffix && !suffix.empty? end |
#validate! ⇒ Object
17 18 19 |
# File 'lib/rjax/config.rb', line 17 def validate! raise Rjax::InvalidConfigurationError, "provide suffix or prefix" unless suffix? || prefix? end |