Class: Lebowski::Foundation::Views::Support::SimpleItem

Inherits:
Object
  • Object
show all
Defined in:
lib/lebowski/foundation/views/support/simple_item_array.rb

Direct Known Subclasses

SegmentItem

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (SimpleItem) initialize(parent, title, value)

A new instance of SimpleItem



15
16
17
18
19
# File 'lib/lebowski/foundation/views/support/simple_item_array.rb', line 15

def initialize(parent, title, value)
  @title = title
  @value = value
  @parent = parent
end

Instance Attribute Details

- (Object) title (readonly)

Returns the value of attribute title



13
14
15
# File 'lib/lebowski/foundation/views/support/simple_item_array.rb', line 13

def title
  @title
end

- (Object) value (readonly)

Returns the value of attribute value



13
14
15
# File 'lib/lebowski/foundation/views/support/simple_item_array.rb', line 13

def value
  @value
end

Instance Method Details

- (Object) click



21
22
23
# File 'lib/lebowski/foundation/views/support/simple_item_array.rb', line 21

def click()
  @parent.click @title
end

- (Object) select



29
30
31
# File 'lib/lebowski/foundation/views/support/simple_item_array.rb', line 29

def select()
  click if not selected?
end

- (Boolean) selected?

Returns:

  • (Boolean)


25
26
27
# File 'lib/lebowski/foundation/views/support/simple_item_array.rb', line 25

def selected?()
  return @parent.selected?(@title)
end

- (Object) to_s



33
34
35
# File 'lib/lebowski/foundation/views/support/simple_item_array.rb', line 33

def to_s()
  return "SimpleItem<title: #{title}, value: #{value}>"
end