Class: Deep::Hash::Struct::Dashboard::Table::Row

Inherits:
Object
  • Object
show all
Includes:
PP::Dashboard::Table::Row
Defined in:
lib/deep/hash/struct/dashboard/table/row.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from PP::Dashboard::Table::Row

#inspect, #pretty_print

Constructor Details

#initialize(options = {}) ⇒ Row

Returns a new instance of Row.



13
14
15
16
17
# File 'lib/deep/hash/struct/dashboard/table/row.rb', line 13

def initialize(options = {})
  self.value = options.delete(:value)
  self.name  = options.delete(:name)
  self.opt   = default_options.merge(options)
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



9
10
11
# File 'lib/deep/hash/struct/dashboard/table/row.rb', line 9

def name
  @name
end

#optObject

Returns the value of attribute opt.



9
10
11
# File 'lib/deep/hash/struct/dashboard/table/row.rb', line 9

def opt
  @opt
end

#valueObject

Returns the value of attribute value.



9
10
11
# File 'lib/deep/hash/struct/dashboard/table/row.rb', line 9

def value
  @value
end

Instance Method Details

#header?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/deep/hash/struct/dashboard/table/row.rb', line 19

def header?
  opt[:header]
end

#side?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/deep/hash/struct/dashboard/table/row.rb', line 23

def side?
  opt[:side]
end

#side_header?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/deep/hash/struct/dashboard/table/row.rb', line 27

def side_header?
  header? && side?
end