Class: HTOTConv::Outline::Item

Inherits:
Struct
  • Object
show all
Defined in:
lib/htot_conv/outline.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#keyObject

Returns the value of attribute key

Returns:

  • (Object)

    the current value of key



64
65
66
# File 'lib/htot_conv/outline.rb', line 64

def key
  @key
end

#levelObject

Returns the value of attribute level

Returns:

  • (Object)

    the current value of level



64
65
66
# File 'lib/htot_conv/outline.rb', line 64

def level
  @level
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



64
65
66
# File 'lib/htot_conv/outline.rb', line 64

def value
  @value
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


65
66
67
68
69
70
# File 'lib/htot_conv/outline.rb', line 65

def valid?
  self.level.kind_of?(Numeric) &&
    (self.level > 0) &&
    (self.level.to_i == self.level) &&
    self.value.kind_of?(Array)
end