Class: Pipio::Metadata
- Inherits:
-
Object
- Object
- Pipio::Metadata
- Defined in:
- lib/pipio/metadata.rb
Instance Attribute Summary collapse
-
#my_screen_name ⇒ Object
readonly
Returns the value of attribute my_screen_name.
-
#service ⇒ Object
readonly
Returns the value of attribute service.
-
#start_time ⇒ Object
readonly
Returns the value of attribute start_time.
-
#their_screen_name ⇒ Object
readonly
Returns the value of attribute their_screen_name.
Instance Method Summary collapse
-
#initialize(metadata_hash) ⇒ Metadata
constructor
A new instance of Metadata.
- #start_mday ⇒ Object
- #start_month ⇒ Object
- #start_year ⇒ Object
- #valid? ⇒ Boolean
Constructor Details
#initialize(metadata_hash) ⇒ Metadata
Returns a new instance of Metadata.
3 4 5 6 7 8 |
# File 'lib/pipio/metadata.rb', line 3 def initialize() @service = [:service] @my_screen_name = normalize_screen_name([:my_screen_name]) @their_screen_name = [:their_screen_name] @start_time = [:start_time] end |
Instance Attribute Details
#my_screen_name ⇒ Object (readonly)
Returns the value of attribute my_screen_name.
10 11 12 |
# File 'lib/pipio/metadata.rb', line 10 def my_screen_name @my_screen_name end |
#service ⇒ Object (readonly)
Returns the value of attribute service.
10 11 12 |
# File 'lib/pipio/metadata.rb', line 10 def service @service end |
#start_time ⇒ Object (readonly)
Returns the value of attribute start_time.
10 11 12 |
# File 'lib/pipio/metadata.rb', line 10 def start_time @start_time end |
#their_screen_name ⇒ Object (readonly)
Returns the value of attribute their_screen_name.
10 11 12 |
# File 'lib/pipio/metadata.rb', line 10 def their_screen_name @their_screen_name end |
Instance Method Details
#start_mday ⇒ Object
24 25 26 |
# File 'lib/pipio/metadata.rb', line 24 def start_mday @start_time.mday end |
#start_month ⇒ Object
20 21 22 |
# File 'lib/pipio/metadata.rb', line 20 def start_month @start_time.mon end |
#start_year ⇒ Object
16 17 18 |
# File 'lib/pipio/metadata.rb', line 16 def start_year @start_time.year end |
#valid? ⇒ Boolean
12 13 14 |
# File 'lib/pipio/metadata.rb', line 12 def valid? [@their_screen_name, @my_screen_name, @start_time, @service].all? end |