Class: SixSaferpay::Styling
- Inherits:
-
Object
- Object
- SixSaferpay::Styling
- Defined in:
- lib/six_saferpay/models/styling.rb
Instance Attribute Summary collapse
-
#content_security_enabled ⇒ Object
Returns the value of attribute content_security_enabled.
-
#css_url ⇒ Object
Returns the value of attribute css_url.
-
#theme ⇒ Object
Returns the value of attribute theme.
Instance Method Summary collapse
-
#initialize(css_url: nil, content_security_enabled: nil, theme: nil) ⇒ Styling
constructor
A new instance of Styling.
- #to_hash ⇒ Object (also: #to_h)
Constructor Details
#initialize(css_url: nil, content_security_enabled: nil, theme: nil) ⇒ Styling
Returns a new instance of Styling.
6 7 8 9 10 |
# File 'lib/six_saferpay/models/styling.rb', line 6 def initialize(css_url: nil, content_security_enabled: nil, theme: nil) @css_url = css_url || SixSaferpay.config.css_url @content_security_enabled = content_security_enabled @theme = theme end |
Instance Attribute Details
#content_security_enabled ⇒ Object
Returns the value of attribute content_security_enabled.
4 5 6 |
# File 'lib/six_saferpay/models/styling.rb', line 4 def content_security_enabled @content_security_enabled end |
#css_url ⇒ Object
Returns the value of attribute css_url.
4 5 6 |
# File 'lib/six_saferpay/models/styling.rb', line 4 def css_url @css_url end |
#theme ⇒ Object
Returns the value of attribute theme.
4 5 6 |
# File 'lib/six_saferpay/models/styling.rb', line 4 def theme @theme end |
Instance Method Details
#to_hash ⇒ Object Also known as: to_h
12 13 14 15 16 17 18 |
# File 'lib/six_saferpay/models/styling.rb', line 12 def to_hash hash = Hash.new hash.merge!(css_url: @css_url) if @css_url hash.merge!(content_security_enabled: @content_security_enabled) if !@content_security_enabled.nil? hash.merge!(theme: @theme) if @theme hash end |