Class: CSKit::Parsers::ScienceHealth::Citation

Inherits:
Struct
  • Object
show all
Defined in:
lib/cskit/parsers/science_health/science_health_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#linesObject

Returns the value of attribute lines

Returns:

  • (Object)

    the current value of lines



9
10
11
# File 'lib/cskit/parsers/science_health/science_health_parser.rb', line 9

def lines
  @lines
end

#pageObject

Returns the value of attribute page

Returns:

  • (Object)

    the current value of page



9
10
11
# File 'lib/cskit/parsers/science_health/science_health_parser.rb', line 9

def page
  @page
end

Instance Method Details

#to_hashObject



14
15
16
17
18
19
# File 'lib/cskit/parsers/science_health/science_health_parser.rb', line 14

def to_hash
  {
    page: page,
    lines: lines.map(&:to_hash)
  }
end

#to_sObject



10
11
12
# File 'lib/cskit/parsers/science_health/science_health_parser.rb', line 10

def to_s
  "#{page}:#{lines.map(&:to_s).join(", ")}"
end