Class: FeastFast::Fast

Inherits:
Object
  • Object
show all
Defined in:
lib/feast_fast/fast.rb

Defined Under Namespace

Modules: STATUS

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hsh = {:status => STATUS::NO, :text => nil}) ⇒ Fast

Returns a new instance of Fast.



14
15
16
17
# File 'lib/feast_fast/fast.rb', line 14

def initialize(hsh={:status => STATUS::NO, :text => nil})
  @status = hsh[:status]
  @text = get_text(hsh[:text])
end

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status.



12
13
14
# File 'lib/feast_fast/fast.rb', line 12

def status
  @status
end

#textObject (readonly)

Returns the value of attribute text.



12
13
14
# File 'lib/feast_fast/fast.rb', line 12

def text
  @text
end

Instance Method Details

#==(fast) ⇒ Object



23
24
25
# File 'lib/feast_fast/fast.rb', line 23

def == fast
  self.status == fast.status && self.text == fast.text
end

#to_sObject



19
20
21
# File 'lib/feast_fast/fast.rb', line 19

def to_s
  @text
end