class Amber::Switch::Content
Constants
- FORM_DATA_CONTENT
- JSON_CONTENT
- TEXT_CONTENT
Attributes
type[RW]
Public Class Methods
new(type, data = nil)
click to toggle source
# File lib/amber/switch/content.rb, line 8 def initialize(type, data = nil) @type = type if data self.data = data end end
Public Instance Methods
body()
click to toggle source
# File lib/amber/switch/content.rb, line 24 def body if self.class.include? Amber::Switch::ContentDelegate return self.serialize @data end end
body=(body)
click to toggle source
# File lib/amber/switch/content.rb, line 30 def body=(body) if self.class.include? Amber::Switch::ContentDelegate @data = self.deserialize body return end end
data()
click to toggle source
# File lib/amber/switch/content.rb, line 16 def data @data end
data=(data)
click to toggle source
# File lib/amber/switch/content.rb, line 20 def data=(data) @data = data end