Class: Rjax::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/rjax/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#prefixObject

Returns the value of attribute prefix.



2
3
4
# File 'lib/rjax/config.rb', line 2

def prefix
  @prefix
end

#suffixObject

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

Returns:

  • (Boolean)


13
14
15
# File 'lib/rjax/config.rb', line 13

def prefix?
  prefix && !prefix.empty?
end

#suffix?Boolean

Returns:

  • (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