Class: Symbol
- Defined in:
- lib/puppet/external/event-loop/better-definers.rb,
lib/puppet/util/monkey_patches.rb,
lib/puppet/external/event-loop/event-loop.rb
Overview
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #imperative ⇒ Object
- #imperative? ⇒ Boolean
- #io_state? ⇒ Boolean
- #predicate ⇒ Object
- #predicate? ⇒ Boolean
- #punctuated? ⇒ Boolean
- #to_zaml(z) ⇒ Object
- #without_punctuation ⇒ Object
- #writer ⇒ Object
- #writer? ⇒ Boolean
Instance Method Details
#<=>(other) ⇒ Object
24 25 26 |
# File 'lib/puppet/util/monkey_patches.rb', line 24 def <=> (other) self.to_s <=> other.to_s end |
#imperative ⇒ Object
35 36 |
# File 'lib/puppet/external/event-loop/better-definers.rb', line 35 def imperative without_punctuation.to_s + "!" end |
#imperative? ⇒ Boolean
23 24 |
# File 'lib/puppet/external/event-loop/better-definers.rb', line 23 def imperative? to_s.include? "!" end |
#io_state? ⇒ Boolean
181 182 183 |
# File 'lib/puppet/external/event-loop/event-loop.rb', line 181 def io_state? EventLoop::IO_STATES.include? self end |
#predicate ⇒ Object
33 34 |
# File 'lib/puppet/external/event-loop/better-definers.rb', line 33 def predicate without_punctuation.to_s + "?" end |
#predicate? ⇒ Boolean
21 22 |
# File 'lib/puppet/external/event-loop/better-definers.rb', line 21 def predicate? to_s.include? "?" end |
#punctuated? ⇒ Boolean
28 29 |
# File 'lib/puppet/external/event-loop/better-definers.rb', line 28 def punctuated? predicate? or imperative? or writer? end |
#to_zaml(z) ⇒ Object
20 21 22 23 |
# File 'lib/puppet/util/monkey_patches.rb', line 20 def to_zaml(z) z.emit("!ruby/sym ") to_s.to_zaml(z) end |
#without_punctuation ⇒ Object
30 31 |
# File 'lib/puppet/external/event-loop/better-definers.rb', line 30 def without_punctuation to_s.delete("?!=").to_sym end |
#writer ⇒ Object
37 38 |
# File 'lib/puppet/external/event-loop/better-definers.rb', line 37 def writer without_punctuation.to_s + "=" end |
#writer? ⇒ Boolean
25 26 |
# File 'lib/puppet/external/event-loop/better-definers.rb', line 25 def writer? to_s.include? "=" end |