Class: Browserless::StyleTag
- Inherits:
-
Object
- Object
- Browserless::StyleTag
- Defined in:
- lib/browserless/style_tag.rb
Instance Attribute Summary collapse
-
#style_tag ⇒ Object
readonly
Returns the value of attribute style_tag.
Instance Method Summary collapse
-
#initialize(style_tag = nil) ⇒ StyleTag
constructor
A new instance of StyleTag.
- #to_h ⇒ Object
Constructor Details
#initialize(style_tag = nil) ⇒ StyleTag
Returns a new instance of StyleTag.
7 8 9 |
# File 'lib/browserless/style_tag.rb', line 7 def initialize(style_tag = nil) @style_tag = style_tag end |
Instance Attribute Details
#style_tag ⇒ Object (readonly)
Returns the value of attribute style_tag.
5 6 7 |
# File 'lib/browserless/style_tag.rb', line 5 def style_tag @style_tag end |
Instance Method Details
#to_h ⇒ Object
11 12 13 14 15 |
# File 'lib/browserless/style_tag.rb', line 11 def to_h return {content: nil} if config_value.nil? config_value.start_with?("http") ? {url: config_value} : {content: config_value} end |