Class: ReactOnRailsPro::RendererArtifact::InlineCompanion

Inherits:
Data
  • Object
show all
Defined in:
lib/react_on_rails_pro/renderer_artifact.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url:, body:) ⇒ InlineCompanion

Returns a new instance of InlineCompanion.



42
43
44
# File 'lib/react_on_rails_pro/renderer_artifact.rb', line 42

def initialize(url:, body:)
  super(url: url.to_s.freeze, body: body.to_s.b.freeze)
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



41
42
43
# File 'lib/react_on_rails_pro/renderer_artifact.rb', line 41

def body
  @body
end

#urlObject (readonly)

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



41
42
43
# File 'lib/react_on_rails_pro/renderer_artifact.rb', line 41

def url
  @url
end

Instance Method Details

#inline?Boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/react_on_rails_pro/renderer_artifact.rb', line 46

def inline?
  true
end

#to_sObject



50
51
52
# File 'lib/react_on_rails_pro/renderer_artifact.rb', line 50

def to_s
  url
end