Class: Browserbeam::MarkdownContent
- Inherits:
-
Struct
- Object
- Struct
- Browserbeam::MarkdownContent
- Defined in:
- lib/browserbeam/types.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#length ⇒ Object
Returns the value of attribute length.
Class Method Summary collapse
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content
2 3 4 |
# File 'lib/browserbeam/types.rb', line 2 def content @content end |
#length ⇒ Object
Returns the value of attribute length
2 3 4 |
# File 'lib/browserbeam/types.rb', line 2 def length @length end |
Class Method Details
.from_hash(data) ⇒ Object
3 4 5 6 |
# File 'lib/browserbeam/types.rb', line 3 def self.from_hash(data) return nil unless data.is_a?(Hash) new(content: data["content"] || "", length: data["length"]) end |