Class: Wardrobe::SetterGetter

Inherits:
Object
  • Object
show all
Defined in:
lib/wardrobe/getter_setter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, priority, block, use_if) ⇒ SetterGetter

Returns a new instance of SetterGetter.



11
12
13
14
15
16
# File 'lib/wardrobe/getter_setter.rb', line 11

def initialize(name, priority, block, use_if)
  @name = name
  @priority = priority
  @block = block
  @use_if = use_if
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



9
10
11
# File 'lib/wardrobe/getter_setter.rb', line 9

def block
  @block
end

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/wardrobe/getter_setter.rb', line 9

def name
  @name
end

#priorityObject (readonly)

Returns the value of attribute priority.



9
10
11
# File 'lib/wardrobe/getter_setter.rb', line 9

def priority
  @priority
end

#use_ifObject (readonly)

Returns the value of attribute use_if.



9
10
11
# File 'lib/wardrobe/getter_setter.rb', line 9

def use_if
  @use_if
end

Instance Method Details

#<=>(other) ⇒ Object



18
19
20
# File 'lib/wardrobe/getter_setter.rb', line 18

def <=>(other)
  priority <=> other.priority
end