Class: CSKit::Volumes::ScienceHealth::Line

Inherits:
Struct
  • Object
show all
Defined in:
lib/cskit/resources/volumes/science_health.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#flyout_textObject

Returns the value of attribute flyout_text

Returns:

  • (Object)

    the current value of flyout_text



24
25
26
# File 'lib/cskit/resources/volumes/science_health.rb', line 24

def flyout_text
  @flyout_text
end

#paragraph_startObject Also known as: paragraph_start?

Returns the value of attribute paragraph_start

Returns:

  • (Object)

    the current value of paragraph_start



24
25
26
# File 'lib/cskit/resources/volumes/science_health.rb', line 24

def paragraph_start
  @paragraph_start
end

#textObject

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



24
25
26
# File 'lib/cskit/resources/volumes/science_health.rb', line 24

def text
  @text
end

Class Method Details

.from_hash(hash) ⇒ Object



39
40
41
42
43
44
45
# File 'lib/cskit/resources/volumes/science_health.rb', line 39

def self.from_hash(hash)
  Line.new(
    hash['text'],
    hash['flyout_text'],
    !!hash['paragraph_start']
  )
end

Instance Method Details

#has_flyout?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/cskit/resources/volumes/science_health.rb', line 25

def has_flyout?
  !!flyout_text
end

#to_hashObject



31
32
33
34
35
36
37
# File 'lib/cskit/resources/volumes/science_health.rb', line 31

def to_hash
  {
    'text' => text,
    'flyout_text' => flyout_text,
    'paragraph_start' => paragraph_start
  }
end